Nagios is an Open Source host, service and network monitoring application that I use to monitor a couple of servers I have at home as well as a couple out on the Internet that I look after. One of my home servers is a Home Theatre PC running Linux and MythTV, and while Nagios checks to make sure its up and monitors its disk space, load & temperature, I wanted to check MythTV itself so I wrote a check plugin to do just that.
The check_mythtv plugin connects to the mythbackend process to make sure its running. It reports the status of the tuners and checks to see how much program guide is available:
$ ./check_mythtv.pl -H mythpvr
Ok: Tuners idle, 7 days program guide available
Normally I have around 7 days worth of guide data so I set the plugin to generate a warning alert (via email) if it falls to 4 days and a critical alert at 2 days. The plugin is a simple Perl script so it could easily be modified to check other things.
|check_mythtv.pl||Nagios plugin for MythTV||1.1||12-02-2011|