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

Added support for Liebert PDUs #10062

Merged
merged 5 commits into from Apr 7, 2019

Conversation

Projects
None yet
5 participants
@spencerbutler
Copy link
Contributor

commented Apr 3, 2019

Fixes:
https://community.librenms.org/t/emerson-liebert-vertiv-pdu-not-showing-power-graphs/7705

This needs feedback from the user, and some touch-ups before it is ready for review.

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.

spencerbutler added some commits Mar 18, 2019

@PipoCanaja

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2019

Hi @spencerbutler
Before deactivating rfc 1628 support on this OS, we should be sure that no device matched by this OS ever uses it ... And that is very difficult to be sure :)
I would suggest to keep it, it should not harm the discovery of devices without support, and keep the users of devices with support happy.

@spencerbutler

This comment has been minimized.

Copy link
Contributor Author

commented Apr 3, 2019

Hi @spencerbutler
Before deactivating rfc 1628 support on this OS, we should be sure that no device matched by this OS ever uses it ... And that is very difficult to be sure :)
I would suggest to keep it, it should not harm the discovery of devices without support, and keep the users of devices with support happy.

sounds good. I'll test that before I submit my next commit in this branch.

@aqthegreat

This comment has been minimized.

Copy link

commented Apr 4, 2019

I let it run overnight and the graphs a looking good for the most part. First comment though is about the thresholds. Are those being pulled over SNMP from the thresholds configured on the PDU, or are they configured elsewhere? A few of them need adjusting and I'm wondering if that's on the PDU, on the server, or in the code?

@spencerbutler

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

I let it run overnight and the graphs a looking good for the most part. First comment though is about the thresholds. Are those being pulled over SNMP from the thresholds configured on the PDU, or are they configured elsewhere? A few of them need adjusting and I'm wondering if that's on the PDU, on the server, or in the code?

Those are configured in includes/definitions/discovery/liebert.yaml. Those OIDs are read from the agent (your device) and used to calculate the thresholds. I think those are read-only values (I'd need to double check to be sure) on the device. I also, think, those values can be overwritten in LibreNMS -- I'm just not sure where off the top of my head.

@aqthegreat

This comment has been minimized.

Copy link

commented Apr 4, 2019

Thanks. I think I see the "divisor" needs to be changed from 10 to 1. In the yaml file:
voltage:
data:
-
oid: lgpPduPsLineTable
value: lgpPduPsLineEntryEpLNTenths
num_oid: '.1.3.6.1.4.1.476.1.42.3.8.30.40.1.19.{{ $index }}'
descr: 'AC RMS {{ $lgpPduPsLineEntryLine }}'
index: 'lgpPduPsLineEntryEpLNTenths.{{ $index }}'
divisor: 10
low_limit: lgpPduPsLineEntryEcThrshldUndrAlarm
high_limit: lgpPduPsLineEntryEcThrshldOvrAlarm

I couldn't find the exact OID, so I used the name to find the alarm level:
snmpwalk -v2c -c LiebertEM 10.24.0.48 -M /opt/librenms/mibs:/opt/librenms/mibs/liebert LIEBERT-GP-PDU-MIB::lgpPduPsLineEntryEcThrshldOvrAlarm
LIEBERT-GP-PDU-MIB::lgpPduPsLineEntryEcThrshldOvrAlarm.1.1.1 = Gauge32: 80 Percent

But this is the message in libre:
Voltage AC RMS 1 above threshold: 119.6 (> 8 )

Did I follow the path correctly? Is that something that needs to be changed in the PR yaml file? I haven't worked with librenms to this detail.

BTW, I can change the thresholds on the temp and humidity sensors and the overall utilization on the PDU directly. I haven't tried that yet though.

@spencerbutler

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

But this is the message in libre:
Voltage AC RMS 1 above threshold: 119.6 (> 8 )

ah!, good catch. I'll rework that and update the PR.

@spencerbutler

This comment has been minimized.

Copy link
Contributor Author

commented Apr 6, 2019

@aqthegreat I reworked the thresholds -- give it a whirl and let me know your thoughts.

@spencerbutler spencerbutler changed the title WiP - Adding support for Liebert PDUs Added support for Liebert PDUs Apr 6, 2019

spencerbutler added some commits Apr 6, 2019

@murrant

murrant approved these changes Apr 7, 2019

@TheGreatDoc TheGreatDoc merged commit 47e0ee1 into librenms:master Apr 7, 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
@aqthegreat

This comment has been minimized.

Copy link

commented Apr 8, 2019

I discarded the original PR, then updated libre (which failed to update overnight) and rediscovered the 2 devices I have added so far. The temp and humidity sensors and corresponding thresholds seem correct. I think amperage and utilization thresholds are also correct, but I have to add a few more PDU's to be sure. The input voltage is correct, but the thresholds are showing at 8v (low) and 102v (high). Do you know the OID's for those thresholds? I can snmpget them and see what the PDU is offering as a value.

@spencerbutler

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

@aqthegreat As far as I know, there aren't any thresholds builtin for "lgpPduPsLineEntryEpLNTenths", as it is a read-only value. If you are in reference to another value, let me know.

        SYNTAX      Unsigned32
        UNITS       "0.1 Volts-AC-RMS"
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Alternating Current RMS Line to Neutral Electrical Potential
             measurement.
             The line/phase being measured is indicated by the corresponding
             lgpPduPsLineEntryLine value of this row in the table."
        ::= { lgpPduPsLineEntry 19 }
@aqthegreat

This comment has been minimized.

Copy link

commented Apr 8, 2019

I see what you mean. There's no associated alarm levels on the PDU. The screen I saw only referred to the current reading in percentage. In that case, can we remove the librenms thresholds for the dashed lines on the voltage graph? That way we won't confuse anyone, plus the PDU's can operate at different voltages (120/208/240).

@spencerbutler

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

I see what you mean. There's no associated alarm levels on the PDU. The screen I saw only referred to the current reading in percentage. In that case, can we remove the librenms thresholds for the dashed lines on the voltage graph? That way we won't confuse anyone, plus the PDU's can operate at different voltages (120/208/240).

I don't follow "dashed lines on the voltage graph". This PR is merged, so if there are other changes you would like to see, please submit a new issue for them.

You can edit those thresholds from the gear -> edit -> health to whatever you like.

@aqthegreat

This comment has been minimized.

Copy link

commented Apr 8, 2019

I thought those were entered in a file somewhere. I see these as recent events from this morning:
Sensor High Limit Updated: voltage liebert lgpPduPsLineEntryEpLNTenths.1.1.1 AC RMS 1 (100.81)
Sensor Low Limit Updated: voltage liebert lgpPduPsLineEntryEpLNTenths.1.1.1 AC RMS 1 (8)
Do you know where libre finds the "100.81" and "8" values?

@spencerbutler

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

Do you know where libre finds the "100.81" and "8" values?

Those values are derived from 2 functions, sensor_low_limit and sensor_limit, in includes/discovery/functions.inc.php. They are based on the "current value" of the sensor at discovery time.

I'm going to try a couple of things and see if I can make those null, by default. If I make progress, it will be in a new PR.

@aqthegreat

This comment has been minimized.

Copy link

commented Apr 9, 2019

Great! Thank you for all of the help!

funzoneq added a commit to funzoneq/librenms that referenced this pull request Apr 30, 2019

Added support for Liebert PDUs (librenms#10062)
* Added support for Liebert PDUs

spencerbutler added a commit to spencerbutler/librenms that referenced this pull request May 21, 2019

Added support for Liebert PDUs (librenms#10062)
* Added support for Liebert PDUs
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.