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