Monitor Windows with Nagios

Install Monitoring Agent on Windows

* Download NSClient++ from http://sourceforge.net/projects/nscplus/.
* Install NSClient++ on the Windows machine as a service. Check “Allow service to interact with desktop” on the Logon tab.
* Uncomment and edit c:\Program Files\NSClient++\NSC.ini:

FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
CheckExternalScripts.dll
NSCAAgent.dll
LUAScript.dll
NRPEClient.dll
CheckTaskSched.dll

use_file=1
allowed_hosts=192.60.250.134

port=12489

* Start NSClient++ service.

Enable Nagios to Monitor Windows

* Verify check_nt command in /usr/local/nagios/etc/objects/commands.cfg
* Verify windows-server template in /usr/local/nagios/etc/objects/templates.cfg
* Uncomment in /usr/local/nagios/etc/nagios.cfg

 cfg_file=/usr/local/nagios/etc/objects/windows.cfg 

* Modify /usr/local/nagios/etc/objects/windows.cfg
– Global replacement of window-server with the Name of windows box.
– Add/Remove services to be monitored.
* If password protection is enabled on NSClient++, edit check_nt command in /usr/local/nagios/etc/objects/commands.cfg file

define command{
command_name	check_nt
command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s secrete -v $ARG1$ $ARG2$
}

* Verify config and restart Nagios

 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/sbin/service nagios restart

References

http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html
http://www.thegeekstuff.com/2008/07/how-to-monitor-remote-windows-machine-using-nagios-on-linux/

This entry was posted in Linux, win. Bookmark the permalink.