Service Monitor is a tool designed to monitor the health of various services in your infrastructure. It is opinionated towards simplicity and ease of use, making it easy to configure and deploy.
- Monitor HTTP/HTTPS services
- Customizable health checks
- Alerts are sent via callbacks
- Simple configuration using YAML files
- Single binary deployment
- Coded in Go for performance and reliability
To use Service Monitor, follow these steps:
-
Download the latest release from the releases page.
-
Create a configuration file in YAML format. An example configuration is provided in the
examplesdirectory asconfig.yaml. -
Run the Service Monitor binary with the configuration file as an argument:
./svc-mon --config /path/to/your/config.yaml
Service Monitor uses a YAML configuration file to define the services to monitor and their health check parameters. Here is the simplest configuration example:
services:
- name: Example Service
url: http://example.com/health
webhook: http://your-webhook-url.com/alertBy default, Service Monitor checks each specified URL every 5 minutes with a 5-second timeout. If a request times out or returns a 5xx HTTP status code, an alert is sent to the configured webhook. Each webhook receives a JSON payload containing details about the alert.
{
"service_name": "Example Service",
"service_url": "http://example.com/health",
"status": "down",
"reason": "http_5xx",
"status_code": 500,
"timestamp": "2026-01-11T23:17:12Z"
}The payload includes:
service_name: Name of the service that failedservice_url: URL that was monitoredstatus: Current status ("up"or"down")reason: Failure reason ("timeout","http_5xx", or"dns_failure")status_code: HTTP status code (omitted for non-HTTP failures)timestamp: ISO 8601 timestamp of the check
Advanced configuration options are available. For example:
services:
- name: Example Service
url: http://service.example.com/health
interval: 60s
timeout: 5s
alert_if:
- dns_failure
- timeout
- http_5xx
webhooks:
- http://your-webhook-url.com/alert
- http://separate-webhook-url.com/alert
defaults:
interval: 300s
timeout: 10sThe webhooks field allows you to specify one or more URLs to receive alerts when a service is down.
To build Service Monitor from source, ensure you have Go, git and Task installed. Then, clone the repository and run the build task:
git clone https://github.com/jzer7/svc-mon.git
cd svc-mon
task buildThe compiled binary will be located in the bin directory.
To run tests, use the following command:
task testService Monitor is licensed under the MIT License. See the LICENSE file for details.