Page 2 of 2
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Tue May 28, 2013 3:54 pm
by imran_khan
Hello,
Thanks. There is no special symbol in password and permission is also OK. I know skip-networking parameter cause this issue but I don’t remove or disable it.
I want to monitor MySQL database in Nagios with skip-networking option.
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Tue May 28, 2013 4:24 pm
by abrist
Is there a reason you want to run with "skip-networking" enabled? If the check works locally, skip-networking should not be an issue though. How is the command defined in the remote host's nrpe.cfg?
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Tue May 28, 2013 5:08 pm
by imran_khan
Hello,
This server is my client server and it is in production. For security purpose my customer define this option in my.cnf file.
command[check_mysql]=/usr/lib64/nagios/plugins/check_mysql -H localhost -u xyz -p user_password
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Wed May 29, 2013 1:40 pm
by sreinhardt
since you do not want to bind to a network interface, have you specified a local unix file socket for mysql, and have you attempted to specify this in the -H parameter of check_mysql?
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Wed May 29, 2013 2:48 pm
by imran_khan
Hello,
Yes, You are correct....
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Thu May 30, 2013 10:59 am
by sreinhardt
So what happens when you use the socket file as a host parameter? Does it allow a connection or not? I would also suggest testing this locally on the nrpe server, opposed to testing via nagios server with nrpe connection.
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Thu May 30, 2013 12:31 pm
by imran_khan
Hello All,
Thanks... Finally, I have resolved the mentioned issue.
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Thu May 30, 2013 1:13 pm
by abrist
What was the solution? (for future forum searchers)
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Thu May 30, 2013 3:42 pm
by imran_khan
Hello,
Please find the Nrpe and Nagios current setting.
NRPE Setting:-
command[check_mysql]=/usr/lib64/nagios/plugins/check_mysql -H localhost -u mysql_user -p mysql_password
Nagios Setting:-
check_command check_mysql!mysql_user!mysql_password change to
check_command check_nrpe!check_mysql!mysql_user!mysql_password
and it works fine.
Re: How to monitor MySQL in Nagios with enabled networking..
Posted: Thu May 30, 2013 3:44 pm
by abrist
Thanks!