Basic monitoring of Windows hosts via NSClient++

 

Nagwin Basic Windows monitoring via NSCLient++

For each Windows host to monitor:

  • Windows host: Install NSClient++ with default settings all the way (say host host104)
  • Windows host: Replace contents of the configuration file nsclient.ini (default location is c:\Program Files\NSClient++):

NRPEServer=enabled
CheckSystem=enabled
CheckDisk=enabled
CheckEventLog=enabled
CheckExternalScripts=enabled


allow arguments = true
allow nasty characters = false
timeout = 30
allowed hosts = 127.0.0.1,your.nagwin.host.ip
port = 5666
 

  • Windows host: Restart NSCLient++ service.
  • Nagwin host: Run the following command to check NRPE connectivity:
<plugins dir>\check_nrpe -H <ip-address-of-Windows-host>

NRPE connectivity is OK if the response is like I (0,4,1,102 2013-07-15) seem to be doing fine...

  • Nagwin host: Create the file host104.cfg in etc/nagios/nagwin directory with the following content:
# Define a host for the local machine
define host{
 use windows-server,host-pnp 
 host_name host104
 alias Windows host 104
 address ip.add.re.ss
 }

define service{
 use generic-service,srv-pnp 
 host_name host104
 service_description Disk C
 check_command check_nrpe!CheckDriveSize -a ShowAll MinWarnFree=10% MinCritFree=5% Drive=c:
 }
		
define service{
 use generic-service,srv-pnp 
 host_name host104
 service_description CPU load
 check_command check_nrpe!CheckCPU -a warn=50 crit=80 time=20m time=10s time=4
 }
		
define service{
 use generic-service,srv-pnp 
 host_name host104
 service_description Memory physical
 check_command check_nrpe!CheckMEM -a MaxWarn=95% MaxCrit=99% ShowAll type=physical
 }

define service{
 use generic-service,srv-pnp 
 host_name host104
 service_description Memory virtual
 check_command check_nrpe!CheckMEM -a MaxWarn=95% MaxCrit=99% ShowAll type=virtual
 }

define service{
 use generic-service,srv-pnp 
 host_name host104
 service_description Memory pagefile
 check_command check_nrpe!CheckMEM -a MaxWarn=95% MaxCrit=99% ShowAll type=page
 }

  • Restart Nagwin_Nagios service and check results via web interface.

 

More information about how to setup NSClient for NRPE can be found here.

Release announcements