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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post by tmcdonald »

127 generally means that the nagios daemon either cannot access it or it does not have execute rights. So I would first suggest listing the permissions on that check

Code: Select all

ls -lva /usr/local/nagios/libexec/check_mysql
Then also su to the nagios user and attempt to execute it.

Code: Select all

su nagios
cd /usr/local/nagios/libexec
check_mysql
Former Nagios employee
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 »

su nagios
I always recommend "su - nagios" over "su nagios" since that gives you the full login experience as nagios.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
Stuart Watts
Posts: 40
Joined: Wed Sep 25, 2013 7:01 am

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

Post by Stuart Watts »

Also, "yum provides */libmysqlclient.so" says that this library is provided by the mysql-devel package, so if you're still seeing the problem after reinstalling the plugin, try manually installing mysql-devel ("yum install mysql-devel")
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post by tmcdonald »

shailendra, let us know if any of this helps.
Former Nagios employee
Locked