Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vlinevych opened this issue Mar 31, 2016 · 5 comments
Open

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

vlinevych opened this issue Mar 31, 2016 · 5 comments

Comments

@vlinevych
Copy link

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
@brettswift
Copy link

Same behaviour here, except I'm not checking for zombies

Uchiwa dashboard shows:
image

Yet locally on the server if I run the same thing:

[root@devcorepptl918 bin]# check-process.rb --pattern 'puppetserver' --critical-under 1
CheckProcess OK: Found 1 matching processes; cmd /puppetserver/

@tgagor
Copy link

tgagor commented Nov 29, 2016

Same problem - checking for zombies and D-state processes.

@majormoses
Copy link
Member

@vlinevich This check has a lot of different things you can check and the defaults wont be good for all of them, I am thinking that the best thing to do is to put some documentation to help people who have run into the same thing.

@majormoses
Copy link
Member

majormoses commented May 12, 2017

Anyone up for documenting this gotcha with the defaults? If not I would accept a pr with a conditional for 0.

@gerard76
Copy link

Thanks for your report. I had the same problem and used your workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants