Page 1 of 1

Strange error in service status

Posted: Thu May 29, 2014 1:42 pm
by c.slagel
We're monitoring numerous MySQL servers with nagios.

We have a service group setup with slave lag,

they're all fine except one is returning the following:

Code: Select all

(No output on stdout) stderr: Can't locate object method "errstr" via package "DBD::MySQL::Server::Connection::Dbi" at /usr/local/nagios/libexec/check_mysql_health line 368.
All the other ones are fine.

Any insight on what the issue may be?

Re: Strange error in service status

Posted: Thu May 29, 2014 1:57 pm
by scottwilkerson
I am going to look into getting this plugin updated in XI, but I believe you can change the following

on line 368
change

Code: Select all

$self->add_nagios_critical(sprintf "unable to get replication info%s",
to

Code: Select all

$self->add_nagios_critical(sprintf “unable to get replication info%s”, DBI::errstr());
I'm pretty sure you are going to still get an error (becase this is triggered by an error condition), but it should be more meaningful...

Re: Strange error in service status

Posted: Thu May 29, 2014 9:00 pm
by c.slagel
I made these changes, however all of our mysql services are now reading:

Code: Select all

(Return code of 255 is out of bounds)

Re: Strange error in service status

Posted: Fri May 30, 2014 1:46 pm
by abrist
Well, the changed output might actually be less verbose :P
Could you post the command that is failing?