check_mysql messed up by passwd, $ appended to request.

John Stile john at stilen.com
Tue Oct 25 20:28:44 CEST 2005


I'm trying to use check_nrpe to run check_mysql on a monitored client.
It seems that the mysql passwd is messing up check_mysql.

On the client to be monitored, I get a vaid response from: 
/usr/lib/nagios/plugins/check_mysql -uroot -p'Blr$3%' -P3306
or 
/usr/lib/nagios/plugins/check_mysql -uroot -pBlr\$3\% -P3306

I setup nrpe.conf on the client, and turned on debugging.
nrpe.conf has:
command[check_mysql]=/usr/lib/nagios/plugins/check_mysql -uroot -pBlr\$3\%c -P3306

When I issue the check_nrpe from the nagios server, a '$' is appended to
the end of the line once the request (seen in debug output on client).
This does not happen for the other checks in nrpe.conf

>From the server:
 /usr/lib/nagios/plugins/check_nrpe -H bugzilla.stilen.com -c check_mysql 

On the client debug log:
Oct 25 11:13:20 bugzilla nrpe[15494]: Connection from 192.168.0.195 port 25005
Oct 25 11:13:20 bugzilla nrpe[15494]: Host address checks out ok
Oct 25 11:13:20 bugzilla nrpe[15494]: Handling the connection...
Oct 25 11:13:20 bugzilla nrpe[15494]: Host is asking for command 'check_mysql' to be run...
Oct 25 11:13:20 bugzilla nrpe[15494]: Running command: /usr/lib/nagios/plugins/check_mysql -uroot -pBlr\$3\%c -P3306$
Oct 25 11:13:20 bugzilla nrpe[15494]: Command completed with return code 2 and output: Access denied for user 'root'@'localhost' (using password: YES)
Oct 25 11:13:20 bugzilla nrpe[15494]: Return Code: 2, Output: Access denied for user 'root'@'localhost' (using password: YES)
Oct 25 11:13:20 bugzilla nrpe[15494]: Connection from 192.168.0.195 closed.

I have been playing with the nrpe.conf configuration trying to find the
correct thing to do.  Any help would be appreciated.  

This is a list of the nrpe.conf lines I've tired:
command[check_mysql]=/usr/lib/nagios/plugins/check_mysql -H localhost -u root -p 'Blr$3%'
command[check_mysql]=/usr/lib/nagios/plugins/check_mysql --hostname='localhost' --username='root' --password='Blr$3%'
command[check_mysql]=/usr/lib/nagios/plugins/check_mysql -u 'root' -p 'Blr$3%'
command[check_mysql]=/usr/lib/nagios/plugins/check_mysql -H 'localhost' -u 'root' -p 'Blr$e%'

I have also tried to pass the username and passwd as arguments from the
nagios server, also with no luck. 





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list