I just went thru this, and got it working. Here's what I did.
First, create a "NLBSNodeCheck.wql" file in the PRTG "WMI WQL Scripts" folder, that contains this script:
SELECT StatusCode FROM MicrosoftNLB_Node WHERE ComputerName= '<#PH1>'
Next, create a custom WMI sensor (not the string version), for the server that is running the Windows NLBS node that you want to monitor.
In the sensor settings:
- Set the namespace to "root\microsoftnlb".
- Select the NLBSNodeCheck.wql file in the WQL File drop-down list.
- In Placeholder <#PH1>, enter the fully qualified name of the server on which the node is running, like "[email protected]".
- Set "If Value Changes" to "Trigger change notification".
In the sensor notifications, add 2 Threshold triggers. Set one trigger to When Primary channel is Equal to 1005 and the other one to When Primary channel is Equal to 1017. 1005 means the node is stopped, and 1017 means the node is suspended. All other values are either OK, or 0 if the node doesn't exist.
That's it.
Here's a helpful PowerShell command you can run to read all the NLBS node values using WMI:
Get-WmiObject -Namespace "root\microsoftnlb" -Class MicrosoftNLB_Node -Impersonation 3 -ComputerName mywebserver
You can use this to read the actual server name NLBS is looking for, as that must match exactly for the PRTG sensor to work. To use this PowerShell command, change the ComputerName to be correct for you, and paste it into PowerShell. You must have administrative rights on the remote server for this to work.
Add comment