I have a couple of windows services running which I can monitor in 2 ways.

1. using the wmi service sensor 2. using the wmi process sensor

The problem is that I want to functionality of both!

The service sensor allows me to restart the service automatically from prtg without extra sensors or batch files but it only monitors the channel 'running (msec)' which is not really helpful.

the wmi process sensor gives me working set, commit size, cpu info (per instance), threads, handles, cpu info (total) and the total number of instances running but has no built in way to restart a proces if it somehow has stopped working. :(

Is there some way to combine the resetting of the service with the extra information?


Article Comments

Dear Thomas,

I'm afraid this can only be done using two sensors in the moment, since they base on different WMI Classes.

best regards.


Oct, 2011 - Permalink

Hi Thomas,

You can setup a trigger that starts a batch notification when the wmi process sensor goes down. In this batch file you can restart the service.

As of Windows XP, you can use sc.exe to stop and start a service on a remote computer

sc \\server stop service
sc \\server start service

Regards,


Oct, 2011 - Permalink

Hi Gerard,

Thank you for your suggestion. My main concern was trying to do it without extra batch scripts. The problem is that in my experience the WMI sensors can go to a down state even when they are in fact not down but there is an intermittent problem with WMI.

So instead of restarting the service on a down state, I'd rather like to do it based on a value like memory usage as these have proven to be more reliable an indicator of that the WMI sensor beeing down.

Oh well, I'll start my powershell editor again :)


Oct, 2011 - Permalink