Hi, I have an issue with one server that I can prevent when a certain service remains in a stopped state. I would like to be alerted as soon as that service is started (or even better, have PRTG act and stop it again), so I can stop it again to prevent issues on the server. How can I have PRTG alert me whenever the service is in a running state (rather than the more logical stopped state)?
Article Comments
Hi, You might want to have a look at the ServiceStatus sensor.
This sensor retrieves the status of a Windows service and returns a numeric value (see table below)
Using limits, you can set the sensor to an Error or Warning state when the service is started.
0 | Not Installed |
1 | Stopped |
2 | Start Pending |
3 | Stop Pending |
4 | Running |
5 | Continue Pending |
6 | Paused Pending |
7 | Paused |
Oct, 2017 - Permalink
Works like a charm, thanks.
For others,
EXE/Script: ServiceStatus.exe
as Parameters I have (Warning is 4 and Error 3, 1 is deemed good (Service is not running in that case 1:OK is the output)):
-s="Service Name" -m=SERVERNAME -w=4 -e=3
e.g.
-s="SMS Agent Host" -m=EURSERV003 -w=4 -e=3
The notification is set to:
When Value (#) channel is Not Equal to 1 for at least 60 seconds perform [your notification here]
Nov, 2017 - Permalink
Hello,
Thank you very much for using PRTG. It is not possible to invert the Service Sensor itself. You can use a work around via the Sensor Factory though, by having it just display the values of the original sensor (as channel definition), and using the following custom Status Formula:
best regards.
Oct, 2017 - Permalink