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

Question regarding restarting Windows Services with a WMI Sensor

Votes:

0

Hello,

we have a Windows Service which was not running and PRTG detected that correctly - however the sensor is configured that it should restart the service, which has not been done and thats why an IT Admin had to interact and restart the service on the server.

Is there any way how to find out why PRTG couldnt restart the service? The only difference i could find between services which have been successfully restarted by PRTG is that this service has dependencies configured to other services - but both of these services were running on which it is depending.

Is there any way to configure PRTG that it is able to restart this service or is this simply not possible?

prtg service-restarts wmi

Created on Aug 25, 2022 9:45:42 AM



1 Reply

Votes:

0

Hello Daniel,

Thank you for your message.

When the WMI service sensor is configured to restart the service, PRTG executes a query on the target device which might indeed fail if Windows prevent for example to restart services dependent on others.

If this is the case, I'm afraid that it is not possible to modify the sensor to force the restart of the service. In such case, you could use a custom script within a notification template by using the Execute Program method. For example, you could use the following PowerShell command to restart a service with dependencies:

Get-Service -ComputerName computername -Name servicename | Restart-Service -force

In order to use the script within the template, the latter must be stored under "C:\Program Files (x86)\PRTG Network Monitor\Notifications\EXE" on the PRTG server.

If you have questions, do not hesitate.

Regards.

Created on Aug 30, 2022 10:29:21 AM by  Florian Lesage [Paessler 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.