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 power consumption detection on Dell servers #10250

Merged
merged 1 commit into from May 23, 2019

Conversation

Projects
None yet
3 participants
@daniviga
Copy link
Contributor

commented May 23, 2019

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
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

Description

This PR fixes the detection of power consumption on Dell servers when this information is exposed via SNMP (using Dell OpenManage).

The issue was caused by the base oid which had one spurious index 1 at the end; the generated oid related to the power consumption was then .1.3.6.1.4.1.674.10892.1.600.30.1.6.1.1.3 instead of .1.3.6.1.4.1.674.10892.1.600.30.1.6.1.3.

The wrong oid was causing the poller to raise a warning (Warning: A non-numeric value encountered in /opt/librenms/includes/polling/functions.inc.php on line 167) leaving the graph always at zero.

Before:

SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OUQnte' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/supermicro:/opt/librenms/mibs/dell' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.674.10892.1.600.30.1.6.1.1.3']

.*.4.1.674.10892.1.6*.1.1.3 = No Such Instance currently exists at this OID  

  

Checking (snmp) power System Board Pwr Consumption... 


Warning: A non-numeric value encountered in /opt/librenms/includes/polling/functions.inc.php on line 167

0 

After

SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OUQnte' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/supermicro:/opt/librenms/mibs/dell' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.674.10892.1.600.30.1.6.1.3']

Checking (snmp) power System Board Pwr Consumption... 
196 
RRD[update /opt/librenms/rrd/wilson.gem.lan/sensor-power-dell-1.3.rrd N:196]
[RRD Disabled]
.*.4.1.674.10892.1.6*.1.3 = 196  
  

SQL[UPDATE `sensors` set `sensor_current`=?,`sensor_prev`=?,`lastupdate`=NOW() WHERE `sensor_class` = ? AND `sensor_id` = ? [196,0,"Power",219] 2.6ms] 
@CLAassistant

This comment has been minimized.

Copy link

commented May 23, 2019

CLA assistant check
All committers have signed the CLA.

@murrant
Copy link
Member

left a comment

Looks good, thanks for the fix :)

@murrant murrant added the Device 🖥 label May 23, 2019

@murrant murrant merged commit e9b3e25 into librenms:master May 23, 2019

6 checks passed

Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details

@daniviga daniviga deleted the daniviga:fix-dell branch May 23, 2019

@murrant

This comment has been minimized.

Copy link
Member

commented May 23, 2019

Oh, I should have had you send test data for this so it stays fixed.

We still can in a separate PR.

@daniviga

This comment has been minimized.

Copy link
Contributor Author

commented May 27, 2019

Oh, I should have had you send test data for this so it stays fixed.

Is an SNMP dump enough?

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