* Windows Client 要安裝的 NSClient++
新版的 client 會自動加規則到內建的防火牆
但這次遇到 nagios server端的 objects/commands.cfg,
預設 $HOSTADDRESS& -p 這段後面不是 IP,會有"server port is not interger" 之類的訊息
就算 NSClient 的設定檔不刻意設定 port ,也要在 commands.cfg 裡指定“ -p 12489”
NSClient++ 安裝時(或事後更改設定檔)設定的密碼
為明碼,在 nagios server端的 objects/commands.cfg
找到(預設應該完全沒有?)
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p portnumber
後面加上“ -s 密碼” 搭配使用
參考:
NSClient++ Port Forwarding and Firewall
The default port for NSClient++ is 12489
You must allow the firewall at your remote server to allow this port access.
Changing NSClient++ port:
You can change the NSClient++ port by modifying the NSC.ini file located at C:\Program Files\NSClient++ (remove “;”)
;# NSCLIENT PORT NUMBER ; This is the port the NSClientListener.dll will listen to. port=12489
Restart the NSClient++ service
Change check_nt -p 12489 argument in /usr/local/nagios/etc/objects/commands.cfg
# 'check_nt' command definition define command{ command_name check_nt command_line $USER1$/check_nt -H $HOSTADDRESS$ -p portnumber -s cjr-nagios -v $ARG1$ $ARG2$ }
參考來源:
http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html
http://www.kernelhardware.org/nagios-nsclient-to-monitor-remote-windows-server/
http://www.thegeekstuff.com/2008/07/how-to-monitor-remote-windows-machine-using-nagios-on-linux/
http://creative1223.pixnet.net/blog/post/1302004
*檢查 D磁碟機,注意後面的參數是 -l d (小寫L)
check_command check_nt!USEDDISKSPACE!-l d -w 80 -c 90
http://nagiosplugins.org/man/check_disk
http://nagiosplugins.org/man/check_nt
待試:
http://nagiosplugins.org/man/check_nt
http://nagioswiki.com/wiki/index.php/Checking_NT_Services_with_Nagios
沒有留言:
張貼留言