What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How to monitor windows service on a Windows Failover Cluster

Votes:

0

Hi

We are trying to monitor some services on a Windows Failover Cluster, using the WMI Service sensor. The issues are that when PRTG is connecting to the cluster it connects to the node which has the cluster IP here and now, and it keeps the connection open. If the service is moved to another node in the cluster the PRTG WMI service sensor reports that the service is now down. It is correct that the service is no longer running a the first node, which is the one PRTG has a open connection to. But the service is still running on the cluster IP. Because Windows is moving both the service and the IP to the new node.

So how do we monitor this? How do we get PRTG to create a new connection to the new node? If we change the IPv4 Address/DNS Name settings on the PRTG device to/from IP or DNS name. PRTG create a new connection and show the service is running again. But we don't want to swap between IP/DNS name every time PRTG show that a service on a cluster is down.

Kind regards Jens

failovercluster windows-services wmi-service

Created on Feb 10, 2021 11:21:19 AM



3 Replies

Votes:

1

Hello, PRTG doesn't have a native function to perform that change. But there is a workaround using an API call. You can select the "Execute HTTP Action" function from the Notification Template that is used when this sensor triggers a Down notification for this service.

In that HTTP action, you can select an URL for an API call for settings change on the device. You can find more information about creating an API in your server under Setup > PRTG API.

On an API call you need to specify the function to manipulate the device, for example the function "setobjectproperty.htm" to change the property of an object, followed by the device ID (Can be found in the Device overview page) then the setting you need to change, in this case it is the Host. In this case, we would be changing from IP address to DNS or the other way around. If you have it set to IP right now, set it to change to DNS.

It can be something like this (The <> spaces are the information you need to specify from your devices, remove <>: https://<YourPRTGIP>/api/setobjectproperty.htm?id=<DeviceID>&name=host&value=<new_device_address_or_DNS>

Test that call in your browser, you have to be logged in to your PRTG. If that API call changes the IP or DNS in the device settings, it means it worked. In order for you to use this API call in the HTTP action URL, you need to specify the PRTG user credentials like this.

https://<YourPRTGIP>/api/setobjectproperty.htm?id=<DeviceID>&name=host&value=<new_device_address_or_DNS>&username=<YourPRTGUsername>&passhash=<the_username_password>

If you need more assistance with this, you can contact us at [email protected]

Created on Feb 15, 2021 6:36:22 PM by  Jonathan Mena [Paessler Technical Support]

Last change on Feb 15, 2021 6:40:30 PM by  Jonathan Mena [Paessler Technical Support]



Votes:

0

Hi,

is this (swapping from\to IP and name) the only solution?

Also, about the suggested workaround via the API action: shouldn't the API action swap IP to Name or viceversa according to the current setting (IP if it was Name or Name if it was IP)?

Let's take this scenario: initially the device is set with the IP and the API URL is hardcoded to change it to Name.

At the first Cluster failover, the API action will change the device to Name and the WMI sensor will keep working.

At the second failover\failback the API action will be triggered, but actually it won't be performing any change since the device was already set to use the Name, so the WMI sensor will stop working.

Am i correct?

Created on Apr 13, 2022 9:43:26 AM



Votes:

0

I understand, this might work for the first time only, unfortunately at the moment we don't have another way to set the device to dinamically change the IP address to a different one from PRTG itself. There might be a posibility to do this by creating a custom script that could add this information to the API call and run it with the right settings. But from the PRTG perspective we dont have another way.

Created on Apr 18, 2022 6:57:02 PM by  Jonathan Mena [Paessler Technical Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.