Page 1 of 1

Problem with mysql health check plugin

Posted: Thu Nov 06, 2014 1:22 pm
by almonitoradmin
Machine details:
64bit CentOS 6.5
Manual XI install
Nagios XI 2014R1.0

I tried running the check_mysql_health module from the command line, and I'm getting this error:

./check_mysql_health --hostname=10.164.130.98 --port=3306 --username=nagios --password="hdfyhte67" --database=information_schema --mode slave-io-running

Code: Select all

Can't locate object method "errstr" via package "DBD::MySQL::Server::Connection::Dbi" at ./check_mysql_health line 379.
I would think that this module would be installed with our Nagios XI package. Any idea why this is happening and the best way to fix?



System Profile:


Nagios XI Installation Profile

Download Profile
System:

Nagios XI Version : 2014R1.0
usawepvl011.ficticious.com 2.6.32-431.11.2.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Apache Information

PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 OPR/25.0.1614.68
Server Name: nagios.ficticious.com
Server Address: 10.164.130.252
Server Port: 443
Date/Time

PHP Timezone: America/Chicago
PHP Time: Thu, 06 Nov 2014 12:20:32 -0600
System Time: Thu, 06 Nov 2014 12:20:32 -0600
Nagios XI Data

License ends in: MTSVNN

nagios (pid 4887) is running...
NPCD running (pid 1279).
ndo2db (pid 1337) is running...
CPU Load 15: 0.46
Total Hosts: 33
Total Services: 490
Function 'get_base_uri' returns: https://nagios.ficticious.com/nagiosxi/
Function 'get_base_url' returns: https://nagios.ficticious.com/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: https://nagios.ficticious.com/nagiosxi/ ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost

Running:
/bin/ping -c 3 localhost 2>&1
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.030 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.029 ms

--- localhost.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.016/0.025/0.030/0.006 ms
Test wget To locahost

WGET From URL: http://localhost/nagiosql/index.php
Running:
/usr/bin/wget http://localhost/nagiosql/index.php
--2014-11-06 12:20:34-- http://localhost/nagiosql/index.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: "/usr/local/nagiosxi/tmp/nagiosql_index.tmp"

0K ..... 100% 339M=0s

2014-11-06 12:20:34 (339 MB/s) - "/usr/local/nagiosxi/tmp/nagiosql_index.tmp" saved [5259/5259]

Re: Problem with mysql health check plugin

Posted: Thu Nov 06, 2014 3:17 pm
by lmiltchev
I haven't tested this plugin with the "--mode=slave-io-running", but I've seen this issue before - check this post:

http://support.nagios.com/forum/viewtop ... 5&start=10

This may be a stupid question, but I have to ask - have you actually set up mysql replication (master/slave)? Does the nagios user has been granted the replication slave privilege?