Nagios上では”Return code of 127 is out of bounds – plugin may be missing”というエラーが出ている
試しに手動実行してみる
# /usr/local/nagios/libexec/check_mysql -H localhost -u root -p ***********************
/usr/local/nagios/libexec/check_mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
確認してみると”libmysqlclient.so.16″がないことが分かる
# /sbin/ldconfig -v | grep mysql
/sbin/ldconfig: Path `/usr/lib64/mysql’ given more than once
/usr/lib/mysql:
libmysqlclient.so.18 -> libmysqlclient_r.so
/usr/lib64/mysql:
libmysqlclient.so.18 -> libmysqlclient_r.so
libmysqlclient_r.so.15 -> libmysqlclient_r.so.15.0.0
libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
パッケージを追加しておく
# yum install mysqlclient16
再び手動実行してみる
# /usr/local/nagios/libexec/check_mysql -H localhost -u root -p ***********************
Uptime: 12635 Threads: 1 Questions: 25334 Slow queries: 0 Opens: 44 Flush tables: 1 Open tables: 37 Queries per second avg: 2.005
0 Comments.