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

newdevice: Added support for Digipower PDU #6014

Merged
merged 67 commits into from Mar 3, 2017

Conversation

Projects
None yet
5 participants
@VVelox
Contributor

VVelox commented Feb 26, 2017

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.

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?

Testers

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

Detects Digipower PDUs and adds the current sensor on them.

VVelox and others added some commits Feb 15, 2017

kitsune
*rename it so it can be called via the apps page
*setup the apps page to call it
@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Feb 27, 2017

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

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Feb 28, 2017

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

1 similar comment
@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Feb 28, 2017

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

@laf laf changed the title from add Digipower PDU detection to newdevice: Added support for Digipower PDU Mar 1, 2017

over:
- { graph: device_current, text: Current }
discovery:
- { sysObjectId: .1.3.6.1.4.1.17420, sysDescr: 'Switched PDU' }

This comment has been minimized.

@laf

laf Mar 1, 2017

Member

Again this can be re-written as:

discovery:
    - sysObjectId: .1.3.6.1.4.1.17420
text: 'Digipower'
type: power
over:
- { graph: device_current, text: Current }

This comment has been minimized.

@laf

laf Mar 1, 2017

Member

No other graphs available like traffic, cpu or ram?

This comment has been minimized.

@VVelox

VVelox Mar 2, 2017

Contributor

Nope. It's a PDU though so amps is the more important bit.

<?php
// Digipower Current
if ($device['os'] == 'digipower') {

This comment has been minimized.

@laf

laf Mar 1, 2017

Member

You can drop this if check

@@ -0,0 +1,6 @@
<?php
$hardware = snmp_get($device, '.1.3.6.1.4.1.17420.1.2.9.1.19.0', '-Ovq');

This comment has been minimized.

@laf

laf Mar 1, 2017

Member

Can you try these as multi get as well as per other PR

This comment has been minimized.

@VVelox

VVelox Mar 2, 2017

Contributor

Done.

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Switched PDU

This comment has been minimized.

@laf

laf Mar 1, 2017

Member

Are these the full sysObjectId and sysDescr from the device?

This comment has been minimized.

@VVelox

VVelox Mar 2, 2017

Contributor

Yup.

[kitsune@vixen42]/home/kitsune/github/librenms% snmpwalk -O n -v 1 -c public pdu2
.1.3.6.1.2.1.1.1.0 = STRING: Switched PDU
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.17420
.1.3.6.1.2.1.1.3.0 = Timeticks: (667593368) 77 days, 6:25:33.68
.1.3.6.1.2.1.1.4.0 = STRING: Zane C. B-H.
.1.3.6.1.2.1.1.5.0 = STRING: pdu2.vulpes
.1.3.6.1.2.1.1.6.0 = STRING: office rack
.1.3.6.1.2.1.1.7.0 = INTEGER: 7
[kitsune@vixen42]/home/kitsune/github/librenms%

@laf

Some changes + can you provide a logo and update the yaml file?

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Mar 2, 2017

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

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Mar 2, 2017

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

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Mar 2, 2017

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

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Mar 2, 2017

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

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Mar 2, 2017

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

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Mar 3, 2017

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

@LibreNMS-CI

This comment has been minimized.

LibreNMS-CI commented Mar 3, 2017

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

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Mar 3, 2017

The inspection completed: 1 updated code elements

@laf laf merged commit 57f27fb into librenms:master Mar 3, 2017

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment