Monitoring Windows DHCP Scopes with Nagios
You need this VB Script in the scripts directory of NSClient++ on the DHCP Server: check_dhcp_scope.vbs
Change the .doc extension to .vbs or hit the link to Nagios exchange below for the original file.
Now in nsc.ini --- Enable NRPEListener.dll and CheckExternalScripts.dll Also in nsc.ini add the following in the External Scripts Section:
check_dhcp_scope=cscript.exe //T:30 //NoLogo scripts\check_dhcp_scope.vbs
Restart the NSClient++ on the DHCP server. On your Nagios Server In nagios/etc/objects/commands.cfg: # 'check_nrpe' command definition define command{ command_name check_nrpe command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c $ARG1$ }
In nagios/etc/servers/.cfg # Create a service for monitoring the DHCP Client scopes # Change the host_name to match the name of the host you defined above define service{ use generic-service host_name service_description DHCP Scopes check_command check_nrpe!check_dhcp_scope }
Output
Sources: http://blog.phobius.net/how-to-use-powershell-scripts-with-nrpe-to-monitor-a-windows-host/ http://exchange.nagios.org/directory/Plugins/Network-Protocols/DHCP-and-BOOTP/Check-DHCP-Server-Scope/details