errno is 2: No such file or directory.. check_mysql

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
shailendra
Posts: 6
Joined: Fri Jun 06, 2014 6:54 am

errno is 2: No such file or directory.. check_mysql

Post by shailendra »

Hi,
I am facing problem while monitoring Mysql of a CentOS Nagios Client machine. All other services are successfully monitored. I have downloaded check_mysql from internet and dumped in /usr/local/nagios/libexec .

When I run command check_mysql then It gives the following error:
[root@nagios libexec]# ./check_mysql
./check_mysql: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

I have reinstalled plugin, by doing this, it deletes check_mysql file from libexec folder. The same is happening with check_asterisks file.

Please let me know where I am missing. Need this on urgent basis.
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: errno is 2: No such file or directory.. check_mysql

Post by eloyd »

It looks like you do not have the proper MySQL libraries on your Nagios server. What operating system are you using on the Nagios server? If it's CentOS, try this:

Code: Select all

yum install mysql mysql-libs
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
shailendra
Posts: 6
Joined: Fri Jun 06, 2014 6:54 am

Re: errno is 2: No such file or directory.. check_mysql

Post by shailendra »

Thanks for the reply,
Do I need to install this (yum install mysql mysql-libs) on Nagios server or the client Cent OS?

Also, suggest, the same thing is happening to monitor Asterisk service on a client CentOS.
shailendra
Posts: 6
Joined: Fri Jun 06, 2014 6:54 am

Re: errno is 2: No such file or directory.. check_mysql

Post by shailendra »

Hi,

I have run the command on Nagios server "yum install mysql mysql-libs
Below is the output:
Package mysql-5.1.73-3.el6_5.x86_64 already installed and latest version
Package mysql-libs-5.1.73-3.el6_5.x86_64 already installed and latest version
Nothing to do

Please suggest.
Sorry for multiple replies, but I am stuck in this :(
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: errno is 2: No such file or directory.. check_mysql

Post by eloyd »

Do I need to install this (yum install mysql mysql-libs) on Nagios server or the client Cent OS?
It needs to be on whatever machine is running the check. If the libraries are already installed, then most likely the problem is due to you grabbing the compiled program from a different host, rather than compiling it on your own server.

If the problem persists, please download the entire nagios plugin source, and build from source on your nagios machine(s). This may resolve the missing library problems.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
shailendra
Posts: 6
Joined: Fri Jun 06, 2014 6:54 am

Re: errno is 2: No such file or directory.. check_mysql

Post by shailendra »

I am trying from Nagios server only, check_mysql is located in /usr/local/nagios/libexec folder. I have download it separatly from internet.

Kindly share the link from where I can download the entire Nagios plugin source and its installation steps. Also suggest, do I need to remove existing plugin? (please give command).
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: errno is 2: No such file or directory.. check_mysql

Post by eloyd »

The information you need is at http://www.nagios.org/download/plugins
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: errno is 2: No such file or directory.. check_mysql

Post by lmiltchev »

Let us know if you run into some issues, while trying to install the nagios plugins. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
shailendra
Posts: 6
Joined: Fri Jun 06, 2014 6:54 am

Re: errno is 2: No such file or directory.. check_mysql

Post by shailendra »

No error found while installing Nagios plugin. still getting same while using check_mysql or check_asterisk .
Still getting same error.
As per my observation, the inbuilt plugins are working fine but when using other plugin like mysql or asterisk it gives error. Please suggest.
shailendra
Posts: 6
Joined: Fri Jun 06, 2014 6:54 am

Re: errno is 2: No such file or directory.. check_mysql

Post by shailendra »

Again reinstalled nagios plugin, now getting below error for check_mysql

(Return code of 127 is out of bounds - plugin may be missing)

Please suggest a resolution
Locked