check_winprocess - checking multiple processes at once

3 posts / 0 new
Last post
gaquick
Offline
Last seen: 6 years 7 months ago
Joined: 17.12.2013 - 03:31
check_winprocess - checking multiple processes at once

Hi all,

Just testing this plugin out at the moment for the purpose of setting a couple of monitoring services.

Having no issue setting up a service to look for potential runaway processes (as per the plugin documented example)

I am having trouble however (following another of the documented examples) to ensure that 5 named processes that make up a particular service are all running and if not, change the service to a critical state.

if I setup my NRPE script with one process like this:

check_winprocess.exe --filter "imagename eq xxxx.exe" --compare ne --critical 1

my NRPE output returns

PROCESS OK - 1 process (es) | 'processes'=1;;1

Great!

If I setup my NRPE script like this:

check_winprocess.exe --filter "imagename eq xxxx.exe","imagename eq yyyy.exe" --compare ne --critical 2

my NRPE output returns

PROCESS CRITICAL - 0 process(es)|'processes'=0;;2

If I add a filter to check any more than 1 process it won't detect any are running.  My script looks like the A.EXE, B.EXE, C.EXE example from the plugin documentation.  Not sure what I'm missing here.  Any assistance would be much appreciated.

 

Cheers

G

 

 

itefix
Offline
Last seen: 1 hour 23 min ago
Joined: 01.05.2008 - 21:33
You're right :

You're right : check_winprocess doesn't use OR operation for multiple filters. It is a limitation that comes from the underlying tasklist command: It simply uses logical AND for multiple filters. We have now updated the documentation. Sorry for misleading you.

 

I am not sure if it will help: You can use wildcards in a filter:

check_winprocess filter "imagename eq myprocess*"

or you can specify a service name:

check_winprocess filter "services eq MyService"

 

gaquick
Offline
Last seen: 6 years 7 months ago
Joined: 17.12.2013 - 03:31
Hi tk, Fortunately using a

Hi tk,

Fortunately using a wildcard works perfectly in my particular situtation.  Appreciate the assistance.

And really like what I can do with this plugin.  Great work! Thanks.

 

Cheers