I wanted to use monit as my desktop-alerting system, meaning that when a service or a machine is unreachable on my personnal network, I’d see a red dot somewhere on my desktop. Why not nagios you’d ask? because my needs are not worth the hassle.
It does not seem to be well known, but monit publishes a special URI that shows a status report in XML when the mini-HTTP status server is enabled. The JSON one is only available for the commercial product they sell, M/Monit, so I wrote this small utility to manipulate status values in a JSON format and show a status report within your
It will read a
~/.getmonitrc configuration file with the following format:
The script itself can be fetched from this gist url, it is used like this:
$ python getmonit.py
The output is actually colored, you can see it here.