ボールを蹴りたいシステムエンジニア

ボール蹴りが大好きなシステムエンジニア、ボールを蹴る時間確保の為に時間がある時には勉強する。

正常稼働のはずなのにnagiosでCRITICALになってる件

先日nagiosを導入後、早速何か監視してみようと思って
nagiosのservicesを見たらlocalhostに対してhttpやpingなどの
基本的な監視項目が設定されていました。
どうやらデフォルトで設定されているんだなーと思ったが、
よく見ると全てCRITICALになってる・・・

念の為、コマンドからpingやwgetしても正常に稼働している事を確認

なんでだろと思って、とりあえずnagiosログを確認

less /usr/local/nagios/var/nagios.log

[1379170808] Warning: Return code of 127 for check of service 'Swap Usage' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1379170838] Warning: Return code of 127 for check of service 'PING' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.      
[1379170988] Warning: Return code of 127 for check of host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.                        
[1379170988] Warning: Return code of 127 for check of service 'Total Processes' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.                                                                                 
[1379170988] Warning: Return code of 127 for check of service 'PING' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.      
[1379171028] Warning: Return code of 127 for check of service 'Current Load' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.                                                                                    
[1379171028] Warning: Return code of 127 for check of service 'Root Partition' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exi

何かめっちゃwaring出てる
該当プラグインがありませんよーってメッセージらしいです


そういえばインストール手順で
標準ライブラリをインストールしてませんでした。

nagios標準ライブラリの最新版はこちらから取得できます
Nagios - Download Nagios Plugins

標準ライブラリをインストール

cd /usr/local/src/
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
tar xzf nagios-plugins-1.4.16.tar.gz
cd nagios-plugins-1.4.16 
./configure --prefix=/usr/local/nagios
make
make install
chown -R nagios:nagios /usr/local/nagios/

コンパイラ時にはprefixでnagiosのホームディレクトリを指定します

nagios再起動

/etc/init.d/nagios restart

ブラウザから再度nagios確認すると
今度は正常にステータスがOKとなっていました


前回のnagiosインストール手順に追記しておきます