Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check CRM
0.6
2013-03-18
- Nagios 3.x
GPL
142710
File | Description |
---|---|
check_crm_v0_5 | old version |
check_crm_v0_6 | old version |
check_crm_v0_7 | current tested stable version |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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:- Requires Perl 5.8 or higher & the Perl Module Nagios::Plugin Nagios user will need sudo access - suggest adding line below to sudoers
nagios ALL=(ALL) NOPASSWD: /usr/sbin/crm_mon -1 -r -f
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 Quorm 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.
Version History
v0.1 09/01/2011
v0.2 11/01/2011
v0.3 22/08/2011 - bug fix and changes suggested by Vadym Chepkov
v0.4 23/08/2011 - update for spelling and anchor regex capture (Vadym Chepkov)
v0.5 29/09/2011 - Add standby warn/crit suggested by Sönke Martens & change of 'our' to 'my' to completely avoid problems with ePN (after much debate and testing we don't think there would be a problem but, changed anyway)
v0.6 14/03/2013 - Change from w+ to S+ in stopped check to cope with Servers that have non word characters in.
v0.7 01/09/2013 - In testing as still not fully tested. Adds optional constraints check (Boris Wesslowski). Adds fail count threshold ( Zoran Bosnjak & Marko Hrastovec )
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:- Requires Perl 5.8 or higher & the Perl Module Nagios::Plugin Nagios user will need sudo access - suggest adding line below to sudoers
nagios ALL=(ALL) NOPASSWD: /usr/sbin/crm_mon -1 -r -f
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 Quorm 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.
Version History
v0.1 09/01/2011
v0.2 11/01/2011
v0.3 22/08/2011 - bug fix and changes suggested by Vadym Chepkov
v0.4 23/08/2011 - update for spelling and anchor regex capture (Vadym Chepkov)
v0.5 29/09/2011 - Add standby warn/crit suggested by Sönke Martens & change of 'our' to 'my' to completely avoid problems with ePN (after much debate and testing we don't think there would be a problem but, changed anyway)
v0.6 14/03/2013 - Change from w+ to S+ in stopped check to cope with Servers that have non word characters in.
v0.7 01/09/2013 - In testing as still not fully tested. Adds optional constraints check (Boris Wesslowski). Adds fail count threshold ( Zoran Bosnjak & Marko Hrastovec )
Reviews (5)
bykepi, August 9, 2019
On Debian systems (maybe more) Perl plugin is renamed to libmonitoring-plugin-perl.
Its enough to change Nagios::Plugin to Monitoring::Plugin everywhere in code (two places) and install the package.
Its enough to change Nagios::Plugin to Monitoring::Plugin everywhere in code (two places) and install the package.
byAlex12353485, August 27, 2018
Works well!
But name of required library has changed to Nagios::Monitoring::Plugin. Just needed to change to two occurrences in the script to make it work.
I installed the required perl module by:
"export PERL_MM_USE_DEFAULT=1; perl -MCPAN -e 'install Nagios::Monitoring::Plugin'"
But name of required library has changed to Nagios::Monitoring::Plugin. Just needed to change to two occurrences in the script to make it work.
I installed the required perl module by:
"export PERL_MM_USE_DEFAULT=1; perl -MCPAN -e 'install Nagios::Monitoring::Plugin'"
byerictech, June 15, 2016
This is an excellent plugin. I did modify it a bit, primarily removing the need for the perl-Nagios-Plugin module, as most of my current modules are simple perl modules. Otherwise, the features provided are just what I needed for crm monitoring. Thanks!
Thank you for this great plugin!
I'm using it in two different environments and it works perfectly.
I've ran into an bug though. When using a resource names with dashes in them (i.e. NY-Server-PROD-ManagementIP), I get the following in the output: check_crm CRITICAL - : ManagementIP Stopped (the "NY-Server-PROD-" is ommited). It looks like it's a regexp issue, but I'm not a Perl expert and can't figure out what's wrong here by myself.
Thanks!
I'm using it in two different environments and it works perfectly.
I've ran into an bug though. When using a resource names with dashes in them (i.e. NY-Server-PROD-ManagementIP), I get the following in the output: check_crm CRITICAL - : ManagementIP Stopped (the "NY-Server-PROD-" is ommited). It looks like it's a regexp issue, but I'm not a Perl expert and can't figure out what's wrong here by myself.
Thanks!
Owner's reply
This should be fixed in 0.6.
Thank you for a great plugin. Easy to configure.