【nagios】nrpe_ntでの監視設定
nrpe_ntを利用してwindowsサーバの監視設定をしてみました。
手順は下記になります。
参考までに・・・
・nagiosサイトなどからnrpe_nt.0.8b-bin.zip nrpe_nt_plugins.zipをダウンロード
・解凍してWindowsサーバのCドライブにアップロード(フォルダ名はnrpe_ntに変更)
・nrpe_nt_pluginsのbin以下をnrpe_ntのbin以下にコピー(上書きでOK)
・nrpe.cfgの修正
allowed_hosts=管理サーバIPアドレス
command[nt_check_disk_c]=はパスをそろえる
・nrpeをサービスに登録
コマンドプロンプトより
C:\Users\Administrator>cd C:\nrpe_nt\bin
NRPE_NT.exe -i
NRPE_NT Service sucessfully installed! ←が出たら成功
※port5666を利用するのでwindowsのファイアウォールは解放です。
・サービススタート
Nagios Remote Plugin Executor for NT/W2Kをスタート
ここで問題発生↓のエラーが発生してサービススタートができませんでした。
「Windows could not start the Nagios Remote Plugin Executor for NT/W2K service on Local Computer
Error 1053: The Service did not respond to the start or control request in a timely fashion.」
原因が分からずアプリケーションログを見たところ下記がありました。
「NRPE_NT: Unknown option specified in config file 'C:\nrpe_nt\bin\nrpe.cfg' - Line 10」
で10行目を見たところ
blowfish_secret=pipexcommunications」
とあったのでこれをコメントアウトしてみました。
で、サービススタートをしたところサービス開始ができました。
次は管理側Linuxサーバ設定です。
commands.cfgに↓を追加
define command{
command_name nt_check_disk_c
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_check_disk_c
}
define command{
command_name nt_check_disk_d
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_check_disk_d
}
define command{
command_name nt_check_disk_e
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_check_disk_e
}
define command{
command_name nt_cpuload
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_cpuload
}
define command{
command_name nt_memload
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_memload
}
define command{
command_name nt_service
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_service
}
define command{
command_name nt_eventlog
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_eventlog
}
最後にdefine serviceの設定
define service {
use test-service
host_name test
service_description C Drive
check_command nt_check_disk_c
}
ここまで出来たらnagiosとNagios Remote Plugin Executor for NT/W2Kをリスタート
手順は下記になります。
参考までに・・・
・nagiosサイトなどからnrpe_nt.0.8b-bin.zip nrpe_nt_plugins.zipをダウンロード
・解凍してWindowsサーバのCドライブにアップロード(フォルダ名はnrpe_ntに変更)
・nrpe_nt_pluginsのbin以下をnrpe_ntのbin以下にコピー(上書きでOK)
・nrpe.cfgの修正
allowed_hosts=管理サーバIPアドレス
command[nt_check_disk_c]=はパスをそろえる
・nrpeをサービスに登録
コマンドプロンプトより
C:\Users\Administrator>cd C:\nrpe_nt\bin
NRPE_NT.exe -i
NRPE_NT Service sucessfully installed! ←が出たら成功
※port5666を利用するのでwindowsのファイアウォールは解放です。
・サービススタート
Nagios Remote Plugin Executor for NT/W2Kをスタート
ここで問題発生↓のエラーが発生してサービススタートができませんでした。
「Windows could not start the Nagios Remote Plugin Executor for NT/W2K service on Local Computer
Error 1053: The Service did not respond to the start or control request in a timely fashion.」
原因が分からずアプリケーションログを見たところ下記がありました。
「NRPE_NT: Unknown option specified in config file 'C:\nrpe_nt\bin\nrpe.cfg' - Line 10」
で10行目を見たところ
blowfish_secret=pipexcommunications」
とあったのでこれをコメントアウトしてみました。
で、サービススタートをしたところサービス開始ができました。
次は管理側Linuxサーバ設定です。
commands.cfgに↓を追加
define command{
command_name nt_check_disk_c
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_check_disk_c
}
define command{
command_name nt_check_disk_d
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_check_disk_d
}
define command{
command_name nt_check_disk_e
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_check_disk_e
}
define command{
command_name nt_cpuload
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_cpuload
}
define command{
command_name nt_memload
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_memload
}
define command{
command_name nt_service
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_service
}
define command{
command_name nt_eventlog
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_eventlog
}
最後にdefine serviceの設定
define service {
use test-service
host_name test
service_description C Drive
check_command nt_check_disk_c
}
ここまで出来たらnagiosとNagios Remote Plugin Executor for NT/W2Kをリスタート
by cimacoppi
| 2011-01-04 18:52
| Linux
検索
最新の記事
| mod_line_editを.. |
| at 2012-12-14 22:25 |
| nagiosでOracleの.. |
| at 2012-12-13 12:25 |
| s3cmdでmultipar.. |
| at 2012-12-06 15:59 |
| tcpservr をssl化する |
| at 2012-03-10 21:50 |
| telnetコマンドでpop.. |
| at 2012-03-06 15:59 |
最新のトラックバック
LInk
アイレット株式会社
ANDROID IRET
iret-ceo
suz-lab
猪突猛進
It's a Smile World
Mのチラ裏
させているブログ
Lykeion Promenade
cf-note
MEMO 4 ME
CTOA日記
わん国謀報部員
物欲の罅
TOY BOX
わん国謀報部員
moz'B
hajulab
秘密結社ぎゅう☆ぎゅう倶楽部
molog
ナシメモ
雑草魂
メモリークラフト
klog
-----------------------
cloudpack
cloudpackブログ
Amazon EC2
クラウド
android
android 開発
Teeda
エステ
自閉症
漢方
自閉症 漢方
横浜 ウェディング
ANDROID IRET
iret-ceo
suz-lab
猪突猛進
It's a Smile World
Mのチラ裏
させているブログ
Lykeion Promenade
cf-note
MEMO 4 ME
CTOA日記
わん国謀報部員
物欲の罅
TOY BOX
わん国謀報部員
moz'B
hajulab
秘密結社ぎゅう☆ぎゅう倶楽部
molog
ナシメモ
雑草魂
メモリークラフト
klog
-----------------------
cloudpack
cloudpackブログ
Amazon EC2
クラウド
android
android 開発
Teeda
エステ
自閉症
漢方
自閉症 漢方
横浜 ウェディング

