Servmon#
KISS (Keep It Simple, Stupid) server monitoring tool with email alerts.
For those who want to keep it simple instead of using complex setups like Prometheus, Grafana, and Alertmanager. It uses the awesome gopsutil library to get system metrics.
Features#
- CPU Monitoring - Monitor CPU usage with configurable thresholds and duration
- Memory Monitoring - Track memory usage with percentage-based alerts
- Disk Monitoring - Monitor multiple disk partitions independently
- HTTP Health Checks - Periodic health checks with failure rate monitoring
- Email Alerts - SMTP-based email notifications with configurable cooldowns
- Graceful Shutdown - Clean shutdown on SIGTERM/SIGINT
- Config Validation - Automatic validation of configuration parameters
- Disk Write/Read performance monitoring
Installation#
Go#
go install pkg.rbrt.fr/servmon@latest
Docker#
docker build -t servmon .
How to use#
Go#
servmon --help
Docker#
# Create config directory
mkdir -p config
cp .servmon.example.yaml config/.servmon.yaml
# Edit config/.servmon.yaml with your settings
# Run
docker run -d \
--name servmon \
--restart unless-stopped \
--pid=host \
--network=host \
-v /:/host:ro \
-v /sys:/sys:ro \
-v /proc:/proc:ro \
-v $(pwd)/config/.servmon.yaml:/root/.servmon.yaml:ro \
servmon