Fetch monit status in JSON

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. Unfortunately, monit does not have simple and nice little desktop apps like nagstamon, so I decided to write my own. 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.