[Nagiosplug-help] Need help using check_mysql

Zembower, Kevin kzembowe at jhuccp.org
Wed Sep 12 21:27:26 CEST 2007


I'm trying to configure check_mysql on my Debian etch system:
cn2:/etc/nagios2/conf.d# /usr/lib/nagios/plugins/check_mysql -V
check_mysql (nagios-plugins 1.4.5) 1.33

I can't get the check to work unless I use the defaults:
cn2:/etc/nagios2/conf.d# /usr/lib/nagios/plugins/check_mysql -H
10.253.192.205 -u nagios -p secret
Can't connect to MySQL server on '10.253.192.205' (111)
cn2:/etc/nagios2/conf.d# /usr/lib/nagios/plugins/check_mysql -H
localhost -u nagios -p secret
Uptime: 2000705  Threads: 1  Questions: 3546235  Slow queries: 0  Opens:
18915  Flush tables: 1  Open tables: 64  Queries per second avg: 1.772
cn2:/etc/nagios2/conf.d# /usr/lib/nagios/plugins/check_mysql -u nagios
-p secret
Uptime: 2000710  Threads: 1  Questions: 3546236  Slow queries: 0  Opens:
18915  Flush tables: 1  Open tables: 64  Queries per second avg: 1.772
cn2:/etc/nagios2/conf.d#

I think I've got the IP address right:
cn2:/etc/nagios2/conf.d# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:B0:D0:49:55:20  
          inet addr:10.253.192.205  Bcast:10.253.192.255
Mask:255.255.255.192
<snip>

I first thought that this could be caused by the 'nagios' MySQL user,
but I have this user defined for all hosts:
kevinz at cn2:~$ mysql -A mysql
Server version: 5.0.32-Debian_7etch1-log Debian etch distribution

mysql> select * from user where User like 'nagios%'\G
*************************** 1. row ***************************
                 Host: %
                 User: nagios
             Password: <snip>
          Select_priv: N
          Insert_priv: N
          Update_priv: N
          Delete_priv: N
          Create_priv: N
            Drop_priv: N
          Reload_priv: N
        Shutdown_priv: N
         Process_priv: N
            File_priv: N
           <snip>
1 row in set (0.00 sec)

mysql>

Can anyone help me get check_mysql working from the command line?

Thanks for all your help and suggestions.

-Kevin

Kevin Zembower
Internet Services Group manager
Center for Communication Programs
Bloomberg School of Public Health
Johns Hopkins University
111 Market Place, Suite 310
Baltimore, Maryland  21202
410-659-6139 




More information about the Help mailing list