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

fans warning/critical logic broken (?) #10

Open
gamato opened this issue Oct 6, 2017 · 3 comments
Open

fans warning/critical logic broken (?) #10

gamato opened this issue Oct 6, 2017 · 3 comments

Comments

@gamato
Copy link

gamato commented Oct 6, 2017

Hi. It's not clear to me what should warning & critical thresholds mean for fans RPMs.
Are they supposed to be lower bounds, meaning that a fan should not spin slower?
Or are they supposed to be upper bounds, meaning that a fan should not spin faster?
Either way the current logic seems to be broken and does not do what I expect.
Can you check and confirm please ? ... Thanks.

gamato added a commit to gamato/check_qnap4 that referenced this issue Oct 6, 2017
- code simplified and cleaned up

XXX: The threshold logic for warning/critical messages seems broken but I'm not sure how it was intended to work. See: nikband#10
@nikband
Copy link
Owner

nikband commented Oct 7, 2017

Yes the logic it's not so simple (and i hope correct) and there are no check of input thresholds.
The logic:
Actual fan 1 speed: 2471rpm
if warning level is 2200 and critical is 2000 the plug in report OK status because the rotation speed is grater
if speed is 2100 the plugin report a warning and under 2000 critical status

In my real nagios i have done some test
fans 2200 2000
Fan #1: OK: 2471 RPM, Fan #2: OK: 2347 RPM|Fan-1=2471;2200;2000 Fan-2=2347;2200;2000

fans 2400 2200
Fan #1: OK: 2446 RPM, Fan #2: WARNING: 2354 RPM|Fan-1=2446;2400;2200 Fan-2=2354;2400;2200

fans 2500 2400
Fan #1: WARNING: 2471 RPM, Fan #2: CRITICAL: 2347 RPM|Fan-1=2471;2500;2400 Fan-2=2347;2500;2400
in this last case I have a fan that run less than 2400

Let me know if it's ok and if you help me to write this in more corret english and logical way you are welcome thanks

In this period i m busy with work... but i don-t forget the plugin

@gamato
Copy link
Author

gamato commented Oct 9, 2017

OK, thank you for explanation, it's clear now.

I've been looking into the script and trying to fix issues I've discovered. You can see my commits in my clone of your repo. I have not changed output or functionality (yet) in order not to break compatibility. Let me know what you think please.

@gamato
Copy link
Author

gamato commented Oct 9, 2017

I added a check to make sure users get it right (that is warning should be higher value than critical in this case).

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

2 participants