Page 1 of 2
check_mysql_health : Return code of 25 is out of bounds
Posted: Tue Aug 05, 2014 1:25 pm
by vAJ
Have a check of a MySQL database that is constantly throwing the error: (Return code of 25 is out of bounds)
Command:
Code: Select all
/usr/local/nagios/libexec/check_mysql_health --hostname=aus02nqhpmysq01.dev.*******.com --port=3306 --username=NagiosMon --password="**********" --database=information_schema --mode threadcache-hitrate --warning 90: --critical 80:
When I run this from he cl, I occasionally get this error:
Code: Select all
Illegal division by zero at /usr/local/nagios/libexec/check_mysql_health line 488.
Thoughts? I'm running the latest version of this wizard. check_mysql_health (2.1)
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Tue Aug 05, 2014 4:26 pm
by scottwilkerson
Does it return correct sometimes?
By chance does aus02nqhpmysq01.dev.*******.com point to a loadbalancer IP or something of that nature, or is it a single server?
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Tue Aug 05, 2014 4:43 pm
by vAJ
Single server and it responds well most of the time. One single poll will fail on occasion. Next poll corrects itself.
Looks like it's in the calculation of connections/sec, like python craps out on itself or something.
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Tue Aug 05, 2014 4:45 pm
by scottwilkerson
Could this server be reaching it max-connections (configurable in /etc/my.cnf)?
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Wed Aug 06, 2014 11:42 am
by vAJ
It's a lightly used dev/test mysql database with 5000 max connections. Doubt it's getting close to that. I found a python junkie on our development team that is going to dig into this script.
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Wed Aug 06, 2014 12:34 pm
by tmcdonald
Did you mean to type a return of 255 or 25? If it is 25 I would suspect the script itself assigning the return value incorrectly (check the if/else clauses for the warn/crit values) but for 255 it could be anything really.
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Wed Aug 06, 2014 1:22 pm
by vAJ
It's a 25.
The illegal division error when running from CLI makes me think it's a problem with the python itself. Looking at stats of the target in real time show it's doing absolutely nothing and I can only reproduce when execute the check in rapid fire.
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Wed Aug 06, 2014 4:10 pm
by abrist
vAJ wrote:The illegal division error when running from CLI makes me think it's a problem with the python itself. Looking at stats of the target in real time show it's doing absolutely nothing and I can only reproduce when execute the check in rapid fire.
I would suspect that this is internal to the script itself. Just to clarify, the issue only happens when you run the same check multiple times near simultaneously?
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Wed Aug 06, 2014 4:14 pm
by vAJ
Well, it happens occasionally as a scheduled check. My assumption is when the script returns the "Illeal Division" to Nagios, Nagios then displays that as "Return Code 25..."
Re: check_mysql_health : Return code of 25 is out of bounds
Posted: Wed Aug 06, 2014 4:23 pm
by abrist
Are these checks running through multiple gearman servers? (One of the servers could have an issue)
It could also be that occasionally the check returns a bad value or unexpected character that is breaking the check or it could be occasionally timing out.