Probably not a popular request so I'm sure it's not possible... but wanted to confirm. Can the WMI Service sensor alert when a service goes from a stopped state to running? Right now I can have it in a down/acknowledged state and alert when it starts but would rather it be 'OK' while the service is stopped.
Best Answer
PTF.ServiceStatus
This is possible with Custom Sensor ServiceStatus. With this sensor you can have any service status set your sensor in a ok, warning or error state.
The sensor returns a value where:
1=Stopped, 2=StartPending, 3=StopPending, 4=Running, 5=ContinuePending, 6=PausedPending, 7=Paused
Parameters:
-s= Name of the service to check. -m= Optional, name or ip of the machine where the service is installed. Default = localhost. -u= Optional Domain\Username of a user account that can access the service status. -p= Optional Password or passhash * of a user account that can access the service status. -w= Optional, comma seperated list of service statusses that should return a warning. -e= Optional, comma seperated list of service statusses that should return an error.
The sensor can be set in a warning or error state by using limits, or by using the the -w= and -e= parameters which will provide a more telling result message.
i.e. using -w=2 and -e=4 will set the sensor to a warning state when the service is StartPending and set the sensor to an error state when the service is Running.
The sensor can be downloaded from this page.
Created on Mar 8, 2012 6:56:36 PM by
PRTG Tools Family [prtgtoolsfamily.com]
(13,413)
●3
●4
2 Replies
Hello,
I'm afraid in the moment PRTG is not able to discern the state a target service is in. But we'll put it on the wish list.
best regards.
PTF.ServiceStatus
This is possible with Custom Sensor ServiceStatus. With this sensor you can have any service status set your sensor in a ok, warning or error state.
The sensor returns a value where:
1=Stopped, 2=StartPending, 3=StopPending, 4=Running, 5=ContinuePending, 6=PausedPending, 7=Paused
Parameters:
-s= Name of the service to check. -m= Optional, name or ip of the machine where the service is installed. Default = localhost. -u= Optional Domain\Username of a user account that can access the service status. -p= Optional Password or passhash * of a user account that can access the service status. -w= Optional, comma seperated list of service statusses that should return a warning. -e= Optional, comma seperated list of service statusses that should return an error.
The sensor can be set in a warning or error state by using limits, or by using the the -w= and -e= parameters which will provide a more telling result message.
i.e. using -w=2 and -e=4 will set the sensor to a warning state when the service is StartPending and set the sensor to an error state when the service is Running.
The sensor can be downloaded from this page.
Created on Mar 8, 2012 6:56:36 PM by
PRTG Tools Family [prtgtoolsfamily.com]
(13,413)
●3
●4
Add comment