Nagios NSClient++ Monitor Windows Services

Scenario / Question:

How do I monitor Windows Services and Processes using check_nt and Nagios NSClient++

Solution / Answer:

Use the check_nt command with the SERVICESTATE and PROCSTATE variables.

Install and Configure Nagios NSClient++ as per the following tutorial:

Nagios NSClient++ to Monitor Remote Windows Server

Edit windows.cfg object file to add services to monitor

On the Nagios Server edit the file /usr/local/nagios/etc/objects/windows.cfg:

# vi /usr/local/nagios/etc/objects/windows.cfg

Add the following to create a new service definition to monitor the process state of WinVNC.exe (VNC Server):

# Create a service for monitoring the WinVNC.exe process
# Change the host_name to match the name of the host you defined above

define service{
        use                     generic-service
        hostgroup_name          windows-servers
        service_description     VNC
        check_command           check_nt!PROCSTATE!-d SHOWALL -l WinVNC.exe
        }

Add the following to create a new service definition to monitor the Service state of the Print Spooler service:

define service{
        use                     generic-service
        hostgroup_name          windows-servers
        service_description     eTrust ITM Web Access Service
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l "Print Spooler"
        }

To monitor a Service other then the Print Spooler, substitute Print Spooler with how the Name of the service appears in the Services window Name column

Windows_Services

Windows_Services

.

No Comments

Leave a reply