Skip to content

πŸ“ A simple service monitor for HTTP endpoint health checks with configurable alerting

Notifications You must be signed in to change notification settings

openais-io/pingpong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PingPong

PingPong is a simple yet powerful service monitor designed for HTTP endpoint health checks with configurable alerting capabilities to Telegram. It helps you keep track of your services' health and notifies you when something goes wrong.

Features

  • πŸ”§ YAML Configuration: Easy-to-use YAML-based configuration for setting up monitoring targets and alert rules
  • πŸ“± Telegram Alerts: Instant notifications through Telegram when service health issues are detected
  • πŸ” HTTP Health Checks: Monitor the health of your HTTP endpoints with retries and custom timeouts
  • ⏰ Cron Scheduling: Schedule health checks using cron expressions
  • πŸš€ Simple Setup: Get started quickly with minimal configuration

Prerequisites

  • Telegram Bot Token (for alerts)
  • YAML configuration file

Configuration

Create a YAML configuration file to specify your monitoring targets and alert settings:

# Base settings for all services
base:
  retries:
    attempts: 3 # Retry attempts
    delay: 3000 # Delay between retries in milliseconds

# List of services to be scheduled
services:
  - name: my-service # Required: Unique name for the service
    enabled: true # Optional: Enable/disable the service
    schedule: "*/1 * * * *" # Required: Cron expression
    timeout: 60000 # Optional: Service-specific timeout in milliseconds
    retries: # Optional: Override base retry configuration
      attempts: 5 # Retry attempts
      delay: 1000 # Delay between retries in milliseconds
    config: # Required: Service-specific configuration
      method: POST # HTTP method
      url: https://api.myservice.com/health
      headers: # Optional: HTTP headers
        - name: Authorization
          value: Bearer auth_token_13245
      query: # Optional: Query parameters
        version: "1.0"
      body: {} # Optional: Request body
    alert:
      telegram:
        token: "your-telegram-bot-token"
        chat_id: "your-chat-id"

Configuration Options

  • Base Settings: Define default retry settings for all services
  • Services: List of services to monitor
    • name: Unique identifier for the service
    • enabled: Toggle service monitoring
    • schedule: Cron expression for check timing
    • timeout: Request timeout in milliseconds
    • retries: Service-specific retry configuration
    • config: HTTP request configuration
      • method: HTTP method (GET, POST, etc.)
      • url: Target endpoint URL
      • headers: Custom HTTP headers
      • query: URL query parameters
      • body: Request body (for POST/PUT)
    • alert: Alert configuration
      • telegram: Telegram bot settings

Getting Started

  1. Create your configuration file as shown above
  2. Run PingPong:
    pingpong start -f config.yaml

Issues and Support

If you encounter any issues or have suggestions for improvements, please submit them to our GitHub repository. We appreciate your feedback!

License

Apache License 2.0

Copyright (c) 2025 OpenAIS

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

πŸ“ A simple service monitor for HTTP endpoint health checks with configurable alerting

Resources

Stars

Watchers

Forks

Packages

No packages published