Added power metric discovery for rfc1628 UPS (fixes librenms/librenms#1257) #1258

Merged
merged 1 commit into from Jun 13, 2015

Projects

None yet

3 participants

@einhirn
Contributor
einhirn commented Jun 12, 2015

Sorry, still not having got the Github syntax for commit messages right. But I think next one will hopefully be merged to the issue since I read up on how to put the reference in there.

@laf
Member
laf commented Jun 12, 2015

@einhirn Thanks for this PR, is the reason to make the sensors unique and be discovered?

@laf laf added the Discovery label Jun 12, 2015
@einhirn
Contributor
einhirn commented Jun 13, 2015

Not sure I understand the question. I added this bit because I can read power values from my rfc1628 compliant UPS and wanted them to appear in librenms. "Power" seemed to be the right sensor type.

@laf
Member
laf commented Jun 13, 2015

Sorry to be more clear, lines like $index = 100+$i; is this to make the index value unique?

@einhirn
Contributor
einhirn commented Jun 13, 2015

I just copied that from other discovery scripts 😀
But yes - since there are up to three lists of Lines (Input, Bypass, Output) each of them usually counting Lines 1,2,3 there's an offset added so the index is unique.

@einhirn einhirn Added power metric discovery for rfc1628 UPS (fixes #1257)
5c45400
@laf laf merged commit dc0280b into librenms:master Jun 13, 2015

2 checks passed

Auto-Deploy Build finished.
Details
Scrutinizer 4 new issues
Details
@einhirn einhirn deleted the rztuc:issue-1257 branch Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment