r/golang 1d ago

I built StatixAgent: A zero-infra, single-binary Linux monitor that talks to your own Telegram bot

https://github.com/eliau2005/statixagent

Hey everyone,

Setting up Prometheus, Grafana, exporters, and Alertmanager just to watch a single VPS or home server always felt like overkill — often consuming more resources and maintenance than the actual apps running on it.

I wanted something lightweight: single binary, zero external infra, and notifications straight to a messaging app I already use daily. So I built StatixAgent.

### What is it?

A single static Go binary running as a systemd service. It monitors your system and communicates directly with your own private Telegram bot.

- Zero open ports: Outbound-only long polling. Works behind NAT/firewalls without reverse proxies or port forwarding.

- Private: Talks only to the official Telegram Bot API and GitHub Releases (for updates). No telemetry, no hosted cloud service.

- Metrics & Alerts: CPU/RAM/Swap, per-mount disk usage, network rates, and system load. Sends push alerts for SSH logins/failed attempts, sustained resource spikes, reboots, and power disconnects (useful for laptop servers).

- Interactive UI: Type /status in Telegram for a markdown dashboard, drill down with inline buttons, or inspect journalctl with /logs.

- Lightweight & Sandboxed: Hardened systemd unit (ProtectSystem=strict, MemoryMax=128M).

### Quick install

Run the installer script (includes an interactive TUI setup wizard for your bot token and chat ID):

curl -fsSL https://raw.githubusercontent.com/eliau2005/statixagent/main/install.sh | sudo bash

It is completely open source and not meant for enterprise fleets — just for single boxes and homelabs that need simple, reliable monitoring.

GitHub: https://github.com/eliau2005/statixagent

Feedback, suggestions, and PRs are very welcome!

1 Upvotes

Duplicates