/usr/lib/nagios/plugins/check_mysql_health has too many err

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

/usr/lib/nagios/plugins/check_mysql_health has too many err

Post by sinkak »

i am migrating nagios from old machine to new machine

this check works on old one.

Code: Select all

ubuntu@monitoring:~$ /usr/lib/nagios/plugins/check_mysql_health --hostname xx.xx.xx.xx
Use of qw(...) as parentheses is deprecated at /usr/lib/nagios/plugins/check_mysql_he
Use of qw(...) as parentheses is deprecated at /usr/lib/nagios/plugins/check_mysql_he
Use of qw(...) as parentheses is deprecated at /usr/lib/nagios/plugins/check_mysql_he
OK - 3 running threads | threads_running=3;10;20
where as on new server

Code: Select all

ubuntu@nagios-2015:~$ /usr/lib/nagios/plugins/check_mysql_health --hostname xx.xx.xx.xx --username nagios --password nagios --port 3306 -mode threads-connected
"my" variable $self masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1273.
"my" variable $message masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1274.
"my" variable $self masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1279.
"my" variable $message masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1280.
"my" variable $self masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1285.
"my" variable $message masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1286.
"my" variable $self masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1291.
"my" variable $self masks earlier declaration in same scope at /usr/lib/nagios/plugins/check_mysql_health line 1297.
syntax error at /usr/lib/nagios/plugins/check_mysql_health line 1259, near "$llevel qw(CRITICAL WARNING UNKNOWN OK)"
Global symbol "$llevel" requires explicit package name at /usr/lib/nagios/plugins/check_mysql_health line 1260.
Global symbol "$self" requires explicit package name at /usr/lib/nagios/plugins/check_mysql_health line 1261.
Global symbol "$llevel" requires explicit package name at /usr/lib/nagios/plugins/check_mysql_health line 1261.
syntax error at /usr/lib/nagios/plugins/check_mysql_health line 1270, near "}"
syntax error at /usr/lib/nagios/plugins/check_mysql_health line 1276, near "}"
syntax error at /usr/lib/nagios/plugins/check_mysql_health line 1282, near "}"
syntax error at /usr/lib/nagios/plugins/check_mysql_health line 1288, near "}"
syntax error at /usr/lib/nagios/plugins/check_mysql_health line 1294, near "}"
syntax error at /usr/lib/nagios/plugins/check_mysql_health line 1307, near "}"
/usr/lib/nagios/plugins/check_mysql_health has too many errors.
did i miss some package during installation?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: /usr/lib/nagios/plugins/check_mysql_health has too many

Post by hsmith »

How did you migrate? Did you fresh install and you're copying configs over, are you using some type of tool to do it?
Former Nagios Employee.
me.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: /usr/lib/nagios/plugins/check_mysql_health has too many

Post by sinkak »

i installed current version of nagios.
copied old config files and edited the necessary changes.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: /usr/lib/nagios/plugins/check_mysql_health has too many

Post by sinkak »

rest of the checks are working. These checks alone have problem.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: /usr/lib/nagios/plugins/check_mysql_health has too many

Post by lmiltchev »

Are you running this on Ubuntu? I can see "ubuntu@nagios"... You posted on the "Nagios XI" general support forum, but this is not a "default" path to the nagios plugins in XI:

Code: Select all

/usr/lib/nagios/plugins/
Are you running the same version of the "check_mysql_health" plugin on both boxes? Have you run "diff" to compare them?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: /usr/lib/nagios/plugins/check_mysql_health has too many

Post by sinkak »

yes i am running nagios on ubuntu.
I did install new nagios version on new server but copied scripts, config files and plugins from old server.

how to check plugin in version?

They both have same perl modules.

perl install
perl-base install
perl-modules install

only difference is new server has (v5.18.2) where as old one has (v5.14.2)

i downgraded new server Perl version to 5.14.2 and run the same command again but still has same error.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: /usr/lib/nagios/plugins/check_mysql_health has too many

Post by sinkak »

i installed latest version of check_mysql_health again.
its working.

Thank You

please close this post
Locked