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 can I monitor if a service gets started that I want to remain down

Votes:

0

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)?

alert service stop-automatically stopped

Created on Oct 10, 2017 8:38:03 AM



Best Answer

Accepted Answer

Votes:

0

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.

0Not Installed
1Stopped
2Start Pending
3Stop Pending
4Running
5Continue Pending
6Paused Pending
7Paused

Created on Oct 18, 2017 7:07:47 AM



3 Replies

Votes:

0

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:

10000 - status(id_of_the_source_sensor)

best regards.

Created on Oct 10, 2017 1:10:00 PM by  Torsten Lindner [Paessler Support]



Accepted Answer

Votes:

0

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.

0Not Installed
1Stopped
2Start Pending
3Stop Pending
4Running
5Continue Pending
6Paused Pending
7Paused

Created on Oct 18, 2017 7:07:47 AM



Votes:

1

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]

Created on Nov 1, 2017 10:18:42 AM




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.