Tips and Tricks
Monitoring Microsoft Clusters
If you wish to check the state of a clustered service on Windows 2000 or Windows 2003 (such as Microsoft SQL Server), you can do so using nsclient++. The main issue is that if you have a multiple node cluster, you do not know which one is active at any given time. If you monitor both nodes using Nagios, one will always be critical while the other is not. This is not a good situation. The cleanest solution is to cluster the NSClient++ daemon, so that it is always running on the active node. This is simple to do using the "Generic Application" Resource template in the Cluster Administrator. There are a few considerations.
- You may wish to monitor each node individually to ensure services such as the clustering service itself are running.
- You may additionally wish to monitor the ACTIVE node for clusered services (such as MSSQL or Exchange).
You can achieve this with the latest version (0.2.5h as of writing). You must install it using the following method.
Installing on a Node
- First, extract the archive to a folder (c:\nsclient).
- Install the service (c:\nsclient\nsclient++ /install).
- Configure the service to only listen on the machines's IP address, use the bind_to_address option for both the NRPE and NSClient listeners.
Repeat for all nodes in cluster.
Installing for Clustered Services.
- If you do not have any clustered physical disks in your service's resource group, create one.
- Copy the nsclient binaries and configuration from one of the nodes to the clustered physical disk (c:\nsclient\* -> d:\nsclient\) assuming D is your clustered physical disk.
- Modify the shared configuration file so that the bind_to_address matches the IP Address resource defined in your clustered service's group in the Cluster Administrator.
- Using the Cluster Administrator, create a new resource in the group that contains the clustered service you wish to monitor.
- Give the Resource a name like <service>_nsclient (each resource name must be unique within a cluster, so if you monitor multiple services, you will need to prepend the service name as shown).
- Use an appropriate description, and choose "Generic Application" as the resource type.
- On the next page, choose which nodes are possible owners (should match the service you wish to monitor).
- On the next page, make the resource depend on the IP Address resource that exists in the group.
- On the next page, specify the path to the nsclient++.exe on the clustered physical disk for the command line. MAKE SURE YOU USE THE /test ARGUMENT. nsclient++ will not actually start up unless you provide it the /test argument.
- Click finish.
- You can now utilize the IP Address specified by the IP Address resource in the resource group to monitor this service. You can be assured that the nsclient will be running on whatever node is active for the service in this group.







