Can anyone recommend a check plugin for Nagios 3 that works with NRPE?
closed as off-topic by Magellan, colealtdelete, Tim Brigham, Sven♦, Ward♦ Oct 12 '13 at 1:44
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve." – Magellan, colealtdelete, Tim Brigham, Sven, Ward
Well, I tried the check_mysqld plugin from William Leibzon and it works great. You can indeed control much more variables than the standard nagios plugin. I just dropped the plugin in /usr/local/nagios/libexec and ran it from the cli and it works. I added it to the nagios (opsview, in fact, but the engine is nagios) checks and now I have nice graphics. So maybe there is something you did not set up properly with it.
A few things: run the plugin as user nagios from the shell. If the database is a remote server, verify that the user and server you are using the plugin from may query the mysql server and the database you are pulling data from (standard is database: mysql).
My check is like this:
nagios@host:$ cd /usr/local/nagios/libexec $./check_mysqld.pl -H hostname -u user -a slow_queries -w 44 -c 55 -f MYSQL 5.0.51a-24+lenny4 OK - slow_queries=0 | slow_queries=0
the -u is the mysql user at the database server. This database user has no password to query the mysql database.
What would you like to check?
I am using the check_mysql that comes with the plugins package on my Centos nagios box to remotely monitor MySQL. There is no need for NRPE with this setup.
There is a very good need for NRPE in situations where MSQL is not to be open to queries from hosts other than localhost, or when the mysqld process cannot be bumped to allow a configuration change.
Adding commands to check via NRPE is really simple. For Mysql Add the following line to your nrpe.cfg file:
command[check_mysql]=sudo /usr/lib/nagios/plugins/check_mysql -u'user' -p'pass'
Here is your Command definition for Nagios: $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql
Add this line to your /etc/sudoers: nagios ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/check_mysql
Make sure you aren't allowing command line parameters to be passed to the command: dont_blame_nrpe=0
To create any other NRPE command replace 'check_mysql' with the name of the command you wish to create, and the path to the actual command after sudo. Same for the sudoers file.
- HTH ~ Dan.