Nagios Plugin - Check CRM

Nagios Plugin - Check CRM

Perl Script that checks the status of a Pacemaker based Cluster using crm_mon.

This Plugin Checks the status of a Pacemaker based cluster using crm_mon. It checks there is quorum, the status of nodes and the status of resources. Sending a Critical if there are any errors. Only runs on local host so I suggest you use NRPE if nagios isn't local.

With the -w option, failed Nodes, stopped Resources detected or Standby Nodes sends Warning instead of Critical (default) as long as there are no other errors and there is Quorum.

With the -s option ignores any Node(s) in Standby, by default sends Critical (unless using -w).

If Pacemaker isn't installed in /usr/sbin the script will need editing see comments in script.

NOTE:- In sudoers if requiretty is on (off state is default) you will also need to add the line below

Defaults:nagios !requiretty

If you are using SLES 10 you might find that it incorrectly throws a crit, this is because SLES 10 does not give info on quorum you will need to delete that part of the code. Works fine on SLES 11 thanks to Andrew Ferguson for letting me know.

If you get any unusual errors in crm_mon that this doesn't pick up please let us know.