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

fix: Apply divisor / multiplier to high/low limits in sensors #8427

Merged
merged 10 commits into from Apr 14, 2018

Conversation

Projects
None yet
3 participants
@laf
Copy link
Member

laf commented Mar 20, 2018

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

Fixes: #8163

If a numeric value is provided for _limits then it's used as is. If not, we apply the divisor / multiplier to those limits. I've been through all the yaml files and the only one which will have an issue with this is the one I've changed to hard coded limits. The devices value requires a divisor but the _limits don't.

Uncommented the _limit values from the yaml that the issue references as it was commented out due to this.

This will fix some high/low limits for yaml files where it should have been applied to but isn't.

@laf laf added the Bug 🐞 label Mar 20, 2018

@murrant

This comment has been minimized.

Copy link
Member

murrant commented Mar 22, 2018

What do you think about having a different key for limits that don't need a divisor?
For example raw_high_limit?

@laf

This comment has been minimized.

Copy link
Member Author

laf commented Mar 23, 2018

We could I guess. This one vendor I've changed is the only one I've seen that doesn't support it as you'd expect so I'd prefer to keep things simple until we do actually need it.

@murrant

This comment has been minimized.

Copy link
Member

murrant commented Apr 6, 2018

@laf, you can update all sensors by running ./scripts/save-test-data.php -m sensors

@laf

This comment has been minimized.

Copy link
Member Author

laf commented Apr 10, 2018

Finally!

@murrant
Copy link
Member

murrant left a comment

Are you sure this is right @laf ? I see a lot of limits being changed to zero in the updated data.

@scrutinizer-notifier

This comment has been minimized.

Copy link

scrutinizer-notifier commented Apr 13, 2018

The inspection completed: 4 new issues

@laf

This comment has been minimized.

Copy link
Member Author

laf commented Apr 13, 2018

Well spotted @murrant should be fixed now.

@murrant murrant merged commit 1c94cdd into librenms:master Apr 14, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@laf laf deleted the laf:fix/issue-8163 branch Apr 14, 2018

TheMysteriousX added a commit to TheMysteriousX/librenms that referenced this pull request May 20, 2018

fix: Apply divisor / multiplier to high/low limits in sensors (libren…
…ms#8427)

* fix: Apply divisor / multiplier to high/low limits in sensors

* Updated test data for airos

* updated sensors test data

* Updated test data

* Updated test files

* updated dell-rpdu tests

* Updated to do division / multiply after check for value

@lock lock bot locked as resolved and limited conversation to collaborators Jun 13, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.