Strange error in service status

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
c.slagel
Posts: 57
Joined: Mon Dec 17, 2012 6:47 pm

Strange error in service status

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Strange error in service status

Post 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...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
c.slagel
Posts: 57
Joined: Mon Dec 17, 2012 6:47 pm

Re: Strange error in service status

Post 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)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Strange error in service status

Post by abrist »

Well, the changed output might actually be less verbose :P
Could you post the command that is failing?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked