newdevice: Basic Dell UPS Support #5258

This commit is contained in:
Søren Rosiak
2017-01-01 18:18:44 +02:00
committed by Neil Lathwood
parent 1f7c462941
commit 28dff189c7
6 changed files with 1544 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
os: dell-ups
text: 'Dell UPS'
type: power
icon: dell
over:
- { graph: device_current, text: Current }
mib_dir:
- dell

View File

@@ -0,0 +1,21 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2017 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$dellups = array(
'.1.3.6.1.4.1.674.10902.2'
);
if (starts_with($sysObjectId, $dellups)) {
$os = 'dell-ups';
}
unset($dellups);

View File

@@ -0,0 +1,17 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2017 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$data = snmp_get_multi($device, 'productIDDisplayName.0 productIDVendor.0 productIDVersion.0 physicalIdentSerialNumber.0', '-OQUs', 'DELL-SNMP-UPS-MIB');
$hardware = $data[0]['productIDDisplayName'];
$serial = $data[0]['physicalIdentSerialNumber'];
$version = $data[0]['productIDVersion'] . $data[0]['productIDVendor'];

1491
mibs/dell/DELL-SNMP-UPS-MIB Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -421,6 +421,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('dell-laser', 'dell-laser-mfp');
}
public function testDellups()
{
$this->checkOS('dell-ups');
}
public function testDeltaups()
{
$this->checkOS('deltaups');

View File

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Dell UPS Rack 3750W High Efficiency Online HV
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.674.10902.2