Add Nagios check for ISPconfig

The monitor page in ISPconfig has a nice overview of the system status, but I would like to be alerted when something changes. In my setup I have Icinga for that, which is Nagios compatible.

I created a Nagios compatible script to export data from the monitor page.

It outputs a single line like: WARNING: (ok: 12, info: system_update, warning: sys_log)

Usage:

In an NRPE compatible config file: command[check_ispconfig]=/usr/bin/sudo /usr/local/ispconfig/server/check_ispconfig.php

/etc/sudoers.d/ispconfig:

Cmnd_Alias  CHECK_ISPCONFIG = /usr/local/ispconfig/server/check_ispconfig.php

nagios  ALL = NOPASSWD : CHECK_ISPCONFIG