Simple server monitoring in Go
go-monitor is simple server monitoring written in Go. I was on the lookout for a tool which allowed me to monitor a list of services and notify me through SMS or email. Everything I found seemed a bit too complex and so
go-monitor was born.
go-monitor monitors a list of services as specified by the user and then notifies one or more users through SMS of any services that are down.
We use MessageBird as an SMS delivery service. SMS can be exchanged for a number of other services through MessageBird.
Config is read through a yaml file. Users can specify how often they are notified of a given service being down through the
defaultttl value in the config.
By default, processes are checked every 60 seconds. This can be increased or decreased depending on the importance of services.
This program is intended for use on Unix systems.
go get github.com/ksred/go-monitor
godep restore(If you are unfamiliar with Godeop see here)
go-monitor.yml.sampleto include the configuration options desired.
Rename config to
bash install.shwill build the program and add it as a service.
How it works
We use a Go to push this onto the server:
ps aux | grep PROCESS_NAME
We then read the number of lines returned. Super simple.
Down the line it would be nice to have server monitoring in addition to process monitoring:
- Disks (usage, read/write)
This could further be extended into network monitoring. Someday.