Page 2 of 3

Re: Monitoring MySQL Servers

Posted: Thu May 16, 2013 10:47 am
by abrist
MSPk wrote:The new issue I have is with multiple instances on a single server. we have a server where multiple MySQL databases are configured to listen on different ports (3306,3307,3308,3309). while configuring the DB's on ports 3307,3308,3309, if we use the respective Instance names I get an error, however if we use the name of the instance on port 3306 it works fine....I'm trying to understand if we are indeed getting the values from different databases from these checks or not.
If you are indeed checking different ports, you should be receiving the metrics for the instance running on that port.
MSPk wrote: The other issue is, we dont seem to get the slow_queries service created even if we check the box while configuring, seems to be an issue with the wizard itself. Please check and confirm.
Could you post an example (full command) of one of your slow_queries checks that is failing?

Re: Monitoring MySQL Servers

Posted: Thu May 16, 2013 12:36 pm
by MSPk
I meant the check itself isn't created if we go via the wizard. We have configured around 5 DB's today using the mysql server wizard with the checkbox against slow queries ticked, but none of the checks were created.

Re: Monitoring MySQL Servers

Posted: Thu May 16, 2013 2:34 pm
by lmiltchev
...if we use the respective Instance names I get an error, however if we use the name of the instance on port 3306 it works fine....
Yes, you need to use the correct port number for each instance. You can double check the ports by running:

Code: Select all

netstat -nlp | grep mysql

Re: Monitoring MySQL Servers

Posted: Mon May 20, 2013 8:25 am
by MSPk
Hi,

I have configured the parameters Slave I/O, Slave Lag and Slave SQL on few servers and on each server these parameters show the status as critical and the status information as Null without any other information. Please suggest

Re: Monitoring MySQL Servers

Posted: Mon May 20, 2013 10:51 am
by abrist
Can you run the check from the cli? What are the full commands for the checks?

Re: Monitoring MySQL Servers

Posted: Mon May 20, 2013 12:24 pm
by MSPk
This is the output we get when run through cli

[root@localhost libexec]# ./check_mysql_health --hostname ipaddress --port 3306 --username userid --password "pwd" --database mysql --mode slave-lag
Can't locate object method "errstr" via package "DBD::MySQL::Server::Connection::Dbi" at ./check_mysql_health line 368.

[root@localhost libexec]# ./check_mysql_health --hostname ipaddress --port 3306 --username userid --password "pwd" --database mysql --mode slave-io-running
Can't locate object method "errstr" via package "DBD::MySQL::Server::Connection::Dbi" at ./check_mysql_health line 379.

[root@localhost libexec]# ./check_mysql_health --hostname ipaddress --port 3306 --username userid --password "pwd" --database mysql --mode slave-sql-running
Can't locate object method "errstr" via package "DBD::MySQL::Server::Connection::Dbi" at ./check_mysql_health line 390.

Re: Monitoring MySQL Servers

Posted: Mon May 20, 2013 1:26 pm
by slansing
Are you able to run the plugin with a mode other than the slave derivatives you showed as an example?

I did a bit of digging and there was an old bug with the usage of this mode, if we can verify others work for you we may be able to back track to the source of this problem.. can you send us a copy of your check_mysql_health as well? To make it easier you can download it from the XI UI in your browser at Admin > Manage Plugins. Thanks a ton! Additionally, what version of Nagios Xi are you running?

Re: Monitoring MySQL Servers

Posted: Mon May 20, 2013 2:13 pm
by lmiltchev
In addition, you may want to check out this link:

http://labs.consol.de/forum/#/index.php ... health-/p1

Hope this helps.

Re: Monitoring MySQL Servers

Posted: Mon May 20, 2013 8:09 pm
by MSPk
Yes the other modes work fine, it only the slave parameters which end up with an error on the cli and a (null) on the nagios interface.

Here is a copy of the check_mysql_health plugin.
New Compressed (zipped) Folder.zip
we are using the latest version of nagios available for download on your website - Nagios XI 2012R1.8

Re: Monitoring MySQL Servers

Posted: Mon May 20, 2013 8:43 pm
by scottwilkerson
I believe I have it fixed in the attached file...

Lets make a backup of you current file

Code: Select all

cp /usr/local/nagios/libexec/check_mysql_health /usr/local/nagios/libexec/check_mysql_health~
Then unzip the attached file and upload through Admin -> Manage Plugins