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: define standard ups-mib divisors properly #6942

Merged
merged 1 commit into from Jul 13, 2017

Conversation

Projects
None yet
4 participants
@murrant
Member

murrant commented Jul 3, 2017

Set default divisors for all devices and remove per-os overrides for them.
We should only use per-os overrides for non-standard behavior.

High possibility for breakage here if devices not listed here have non-standard behavior.

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

fix: ups divisors
Set default divisors for all devices and remove per-os overrides for them.
We should only use per-os overrides for non-standard behavior.

High possibility for breakage here if devices not listed here have non-standard behavior.
@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jul 3, 2017

Member

How's this going to use the standards from the mibs? I thought the reason we had this function in place is that we already know devices don't honour what the standard UPS-MIB divisor is?

Member

laf commented Jul 3, 2017

How's this going to use the standards from the mibs? I thought the reason we had this function in place is that we already know devices don't honour what the standard UPS-MIB divisor is?

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment

LibreNMS-CI commented Jul 3, 2017

Auto-Deploy finished, Test PR at http://6942.ci.librenms.org or https://6942.ci.librenms.org

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Jul 3, 2017

The inspection completed: 1 updated code elements

scrutinizer-notifier commented Jul 3, 2017

The inspection completed: 1 updated code elements

@murrant murrant changed the title from fix: ups divisors to use standards from UPS-MIB by default to fix: define standard ups-mib divisors properly Jul 3, 2017

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Jul 3, 2017

Member

@laf Already discussed a bit on IRC. But the divisor for everything in UPS-MIB isn't just a flat 10 as suggested by the previous code.

Load and Voltage (except upsBatteryVoltage) have a divisor of 1.

This is why we keep having to define those for specific devices as bug reports come in.

Member

murrant commented Jul 3, 2017

@laf Already discussed a bit on IRC. But the divisor for everything in UPS-MIB isn't just a flat 10 as suggested by the previous code.

Load and Voltage (except upsBatteryVoltage) have a divisor of 1.

This is why we keep having to define those for specific devices as bug reports come in.

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jul 3, 2017

Member

This is upsBatteryVoltage:

/opt/librenms-snmpsim/captures/aeg-ups.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 547
/opt/librenms-snmpsim/captures/b6907a29:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 2054
/opt/librenms-snmpsim/captures/cs141.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 3394
/opt/librenms-snmpsim/captures/dellups-3750w.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 2080
/opt/librenms-snmpsim/captures/eaton-powerxpert.snmprec:1.3.6.1.2.1.33.1.2.5.0|2|5444
/opt/librenms-snmpsim/captures/eatonups-ex2200.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 820
/opt/librenms-snmpsim/captures/powerwalker-2.snmprec:1.3.6.1.2.1.33.1.2.5.0|2|2054
/opt/librenms-snmpsim/captures/powerwalker.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 409
/opt/librenms-snmpsim/captures/tripplite.snmprec:1.3.6.1.2.1.33.1.2.5.0|2|542

@murrant That seems to suggest different divisors :(

Member

laf commented Jul 3, 2017

This is upsBatteryVoltage:

/opt/librenms-snmpsim/captures/aeg-ups.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 547
/opt/librenms-snmpsim/captures/b6907a29:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 2054
/opt/librenms-snmpsim/captures/cs141.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 3394
/opt/librenms-snmpsim/captures/dellups-3750w.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 2080
/opt/librenms-snmpsim/captures/eaton-powerxpert.snmprec:1.3.6.1.2.1.33.1.2.5.0|2|5444
/opt/librenms-snmpsim/captures/eatonups-ex2200.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 820
/opt/librenms-snmpsim/captures/powerwalker-2.snmprec:1.3.6.1.2.1.33.1.2.5.0|2|2054
/opt/librenms-snmpsim/captures/powerwalker.snmpwalk:.1.3.6.1.2.1.33.1.2.5.0 = INTEGER: 409
/opt/librenms-snmpsim/captures/tripplite.snmprec:1.3.6.1.2.1.33.1.2.5.0|2|542

@murrant That seems to suggest different divisors :(

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Jul 8, 2017

Member

@laf I'm not sure we use rfc1628 for any of those that report four digit battery voltages

As far as I can tell this should not change the behavior of any devices we know about and should limit the number of "workarounds" in this function to only devices that have non-standard behavior.

Member

murrant commented Jul 8, 2017

@laf I'm not sure we use rfc1628 for any of those that report four digit battery voltages

As far as I can tell this should not change the behavior of any devices we know about and should limit the number of "workarounds" in this function to only devices that have non-standard behavior.

@laf laf merged commit c874fc5 into librenms:master Jul 13, 2017

3 checks passed

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

@murrant murrant deleted the murrant:normalize-ups-mib-divisors branch Jul 13, 2017

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.