A simple Go application that periodically pings HTTP endpoints on a configurable cron schedule.
- Configure multiple endpoints to ping via YAML
- Cron-based scheduling (e.g., every 5 minutes)
- Custom API key header support
- Custom User-Agent header support
- Full HTTP request/response logging for debugging and monitoring
- Parameterized endpoints with iterations (ping multiple organizations with one config)
- Logs response status codes and duration
- Graceful shutdown
brew install --cask bvdwalt/tap/pingergit clone https://github.com/bvdwalt/pinger.git
cd pinger
just build-
Copy the example configuration:
cp config-example.yaml config.yaml
-
Edit
config.yamlwith your endpoints and API key -
Run the pinger:
just run
The config.yaml file supports:
- schedule: Cron expression (e.g.,
*/5 * * * *for every 5 minutes) - timeout-seconds: HTTP request timeout in seconds
- api-key-header-name: Header name for API authentication
- api-key-value: Your API key
- user-agent: Custom User-Agent header (optional)
- endpoints: List of endpoints to ping
- Simple endpoints with
name,url, andmethod - Parameterized endpoints with
iterationsfor dynamic URL/name substitution
- Simple endpoints with
See config-example.yaml for examples.
Pinger logs all HTTP activity including:
- HTTP request details (method, URL, headers)
- HTTP response status and headers
- Endpoint response time and status code
- Any errors encountered during requests
This comprehensive logging is useful for:
- Debugging endpoint issues
- Monitoring API availability
- Tracking response times
- Identifying configuration problems
just build # Build the binary to ./pinger
just run # Build and run the application
just test # Run all tests
just test-verbose # Run tests with verbose output
just test-coverage # Run tests with coverage report (outputs coverage.html)
just fmt # Format all Go code
just lint # Run golangci-lint
just clean # Remove build artifacts