sensu-plugins-process-checks
sensu-plugins-process-checks copied to clipboard
check-process.rb: wrong behaviour if desired process count = 0
I am trying to detect zombie processes and found out that check doesn't work for me:
./check-process.rb -s Z -c 1
CheckProcess CRITICAL: Found 0 matching processes; state Z
The problem is in condition at line 289. Since crit_under
has default value of 1
, check returns CRITICAL.
Workaround is to re-define default values of crit_under
, warn_under
./check-process.rb -s Z -c 0 -C -1 -W -1
CheckProcess OK: Found 0 matching processes; state Z