sensu-plugins-process-checks icon indicating copy to clipboard operation
sensu-plugins-process-checks copied to clipboard

check-process.rb: wrong behaviour if desired process count = 0

Open vlinevych opened this issue 8 years ago • 5 comments

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

vlinevych avatar Mar 31 '16 13:03 vlinevych