Skip to main content

Hello,

We are trying to setup the Windows SNMP plugin with the mode --process-count, but there is something wierd about the logic of this check.

I would like Centreon to send a critical alert if the number of processes running matching my filter equals zero, but Centreon always returns OK.

/usr/lib/centreon/plugins/centreon_windows_snmp.pl --plugin=os::windows::snmp::plugin --mode=processcount --hostname=xyz --snmp-version='2c' --snmp-community='xyz' --process-name='xyz.exe'  --critical='0'

If the xyz.exe process is running this returns OK, but if the process is not running Centreon also returns OK.

Reply when process running

OK: Number of current processes running: 1 | 'nbproc'=0;;0:1;0;

Reply when process not running

OK: Number of current processes running: 0 | 'nbproc'=0;;0:1;0;

Does it mean we cannot check a single process and return the status critical? Does it need to match at least two processes in order to send a critical status?

Best regards,

Lorenzo

Hello,

We have this option in custom macros
 

 

This means that must be at least 1 process running, if not  we receive an alert.

Regards,


Here are my settings and results. The process is currently not running. I tried with and without “:” sign.

Any suggestions?

 

Thanks!

Lorenzo


It seems to work with your solution now. “1:”.

It needed some time time apparently to get the correct status.

Thanks a lot, thread is closed!


Reply