SUSE + Nagios で管理する Windows Server

SUSE 11 に nagios をインストール で nagios core をインストールした後、SUSE + nagios でプリンタ管理もできるようになりました。

次に Windows を管理対象としてみましょう。管理対象となるWindows には NSClient++を導入済みです。

-オブジェクトファイルのサンプル-

/etc/nagios/object には windows.cfg というテンプレートがあるので、このテンプレートを mywindows.cfg という名前にコピーします。コメント行やら余分なものが沢山あるので、これを削除しました。その中で "mywindows.intra" という DNS 名を持つ Windows を監視対象とすることにします。

下線部分が、環境に合わせて変更した部分です。

nagios:/etc/nagios # cat objects/mywindows.cfg
define host{
use windows-server
host_name mywindows
alias My Windows Server
address mywindows.intra
}

#define hostgroup{
# hostgroup_name windows-servers
# alias mywindows
# }

define service{
use generic-service
host_name mywindows
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}

define service{
use generic-service
host_name mywindows
service_description Uptime
check_command check_nt!UPTIME
}


define service{
use generic-service
host_name mywindows
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}


define service{
use generic-service
host_name mywindows
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}


define service{
use generic-service
host_name mywindows
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}


define service{
use generic-service
host_name mywindows
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
}


define service{
use generic-service
host_name mywindows
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
}

nagios:/etc/nagios #



-nagios.cong の書き換えと、チェック、再起動-

/etc/nagios/nagios.cfg に監視対象のホストオブジェクトファイルを追加します。

# Definitions for monitoring a network printer
cfg_file=/etc/nagios/objects/printer.cfg
cfg_file=/etc/nagios/objects/mywindows.cfg ; この行追加


動作チェックを行います。

# nagios -v nagios.cfg

ここでエラーが出なければ、nagios をリスタートさせます。

# /etc/init.d/nagios restart

ブラウザをリロードしてみましょう。

SUSE + Nagios で管理する Windows Server_a0056607_12184550.jpg

起動直後は PENDING となっています。

スキャンしてみると
SUSE + Nagios で管理する Windows Server_a0056607_1223462.jpg

C:ドライブの容量が危機的な状況であると報告が上がっています。


islandcenter.jp

-Keyword-
SUSE SLES Linux Nagios 統合管理 オープンソース Windows ネットワーク管理
by islandcenter | 2013-03-03 12:02 | SUSE | Comments(0)