software · · 2 min read

One Go binary, one YAML file, one SQLite database: I wrote my monitoring tool

By James Thornton

One Go binary, one YAML file, one SQLite database: I wrote my monitoring tool

Why not use Prometheus or Nagios directly?

A developer built a lightweight monitoring solution to track diverse services including HTTP endpoints, PostgreSQL and Oracle databases, Redis, Elasticsearch, machine pings, and Prometheus metrics. The tool sends alerts via Telegram, SMS, and Signal when services fail or recover. It was created to replace complex, heavyweight systems with something simple and self-contained.

The motivation came from managing a heterogeneous infrastructure where existing tools were either too bulky or lacked flexibility. By using Go for the binary, YAML for configuration, and SQLite for state storage, the developer achieved portability and ease of deployment. The system checks service health through direct probes and metric scraping, triggering notifications only on state changes to avoid alert fatigue.

How does it handle different types of services?

Established tools like Prometheus require significant setup and operational overhead, especially for small teams. Nagios, while powerful, involves complex configuration and plugins. The developer wanted immediate visibility without managing clusters or learning domain-specific languages. This custom tool focuses on essential checks and delivers alerts through familiar channels, reducing cognitive load during incidents.

Each service type gets a tailored check: HTTP endpoints are probed for status codes and response times; databases are queried with simple SQL to verify connectivity and latency; Redis and Elasticsearch are checked via their native protocols; machine availability is tested with ICMP pings; Prometheus metrics are scraped at intervals. All results are stored in SQLite to track state transitions and enable reliable alerting on recovery.

What happens if the monitoring tool itself goes down? The tool is designed to be minimal and resilient, with no external dependencies beyond the services it monitors. If it fails, manual checks become necessary until it restarts, but its simplicity reduces failure points.

Frequently Asked Questions

Can it monitor cloud-based services like AWS RDS or S3? Yes, as long as the services are accessible via network and support standard protocols like HTTP, SQL, or ping, the tool can monitor them regardless of hosting provider.

Is there a web dashboard for visualizing metrics? No, the tool intentionally avoids a dashboard to maintain simplicity. It prioritizes reliable alerting over visualization, assuming users rely on the notified channels for awareness.

More stories:

Content written by James Thornton for techbriefe.com editorial team, AI-assisted.

Share:

Leave a comment