From 09e888190aaabb18272e618cd2851f048fe52480 Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Wed, 5 Oct 2016 18:58:41 +0100 Subject: [PATCH 01/13] newdevice: Added support for Sinetica UPS --- includes/defaults.inc.php | 1 + includes/definitions.inc.php | 7 ++++++ includes/discovery/os/sinetica.inc.php | 28 +++++++++++++++++++++++ includes/polling/os/sinetica.inc.php | 31 ++++++++++++++++++++++++++ tests/OSDiscoveryTest.php | 5 +++++ tests/snmpsim/sinetica.snmprec | 2 ++ 6 files changed, 74 insertions(+) create mode 100644 includes/discovery/os/sinetica.inc.php create mode 100644 includes/polling/os/sinetica.inc.php create mode 100644 tests/snmpsim/sinetica.snmprec diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 943fcb390a..04fc7aef4c 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -761,6 +761,7 @@ $config['modules_compat']['rfc1628']['poweralert'] = 1; $config['modules_compat']['rfc1628']['multimatic'] = 1; $config['modules_compat']['rfc1628']['webpower'] = 1; $config['modules_compat']['rfc1628']['huaweiups'] = 1; +$config['modules_compat']['rfc1628']['sinetica'] = 1; // Enable daily updates $config['update'] = 1; diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index d577254c77..62205b6f1c 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1450,6 +1450,13 @@ $config['os'][$os]['icon'] = 'mge'; $config['os'][$os]['over'][0]['graph'] = 'device_current'; $config['os'][$os]['over'][0]['text'] = 'Current'; +$os = 'sinetica'; +$config['os'][$os]['text'] = 'Sinetica UPS'; +$config['os'][$os]['group'] = 'ups'; +$config['os'][$os]['type'] = 'power'; +$config['os'][$os]['over'][0]['graph'] = 'device_current'; +$config['os'][$os]['over'][0]['text'] = 'Current'; + $os = 'mgepdu'; $config['os'][$os]['text'] = 'MGE PDU'; $config['os'][$os]['type'] = 'power'; diff --git a/includes/discovery/os/sinetica.inc.php b/includes/discovery/os/sinetica.inc.php new file mode 100644 index 0000000000..6c43de5675 --- /dev/null +++ b/includes/discovery/os/sinetica.inc.php @@ -0,0 +1,28 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Neil Lathwood + * @author Neil Lathwood + */ + +if (starts_with($sysDescr, 'Sinetica UPSController.')) { + $os = 'sinetica'; +} diff --git a/includes/polling/os/sinetica.inc.php b/includes/polling/os/sinetica.inc.php new file mode 100644 index 0000000000..657f674484 --- /dev/null +++ b/includes/polling/os/sinetica.inc.php @@ -0,0 +1,31 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Neil Lathwood + * @author Neil Lathwood + */ + +// Sinetica UPSController. Versions: App. 6.04.03, OS 6.3, Btldr 1.06.09, H/w ZBBNC2 Rev 1.01.06 + +list($os_temp, $os_ver, $btldr, $hardware_temp) = explode(', ', $poll_device['sysDescr']); + +list($ignore, $version) = explode('App. ', $os_temp); +$hardware = preg_replace('/H\/w /', '', $hardware_temp); diff --git a/tests/OSDiscoveryTest.php b/tests/OSDiscoveryTest.php index 7187d088e7..a1a9304994 100644 --- a/tests/OSDiscoveryTest.php +++ b/tests/OSDiscoveryTest.php @@ -1182,6 +1182,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase $this->checkOS('siklu'); } + public function testSinetica() + { + $this->checkOS('sinetica'); + } + public function testSmartax() { $this->checkOS('smartax'); diff --git a/tests/snmpsim/sinetica.snmprec b/tests/snmpsim/sinetica.snmprec new file mode 100644 index 0000000000..2732f07e8c --- /dev/null +++ b/tests/snmpsim/sinetica.snmprec @@ -0,0 +1,2 @@ +1.3.6.1.2.1.1.1.0|4|Sinetica UPSController. Versions: App. 6.04.03, OS 6.3, Btldr 1.06.09, H/w ZBBNC2 Rev 1.01.06 +1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.13891.101 From ddf47180c9221d028379f6db0804af87ac2e627c Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 7 Oct 2016 10:28:12 +0000 Subject: [PATCH 02/13] fix: Fixed trying to map devices to alert rules --- html/ajax_search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/ajax_search.php b/html/ajax_search.php index 77296e4a98..526ef157a5 100644 --- a/html/ajax_search.php +++ b/html/ajax_search.php @@ -59,7 +59,7 @@ if (isset($_REQUEST['search'])) { foreach ($results as $result) { $name = $result['hostname']; - if ($result['sysName'] != $name && !empty($result['sysName'])) { + if ($_REQUEST['map'] != 1 && $result['sysName'] != $name && !empty($result['sysName'])) { $name .= ' ('.$result['sysName'].') '; } if ($result['disabled'] == 1) { From 398164d21553e860569cdee966acf2f57448d158 Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 7 Oct 2016 11:21:19 +0000 Subject: [PATCH 03/13] doc: Added doc on security and vulnerabilities --- doc/General/Security.md | 28 ++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 29 insertions(+) create mode 100644 doc/General/Security.md diff --git a/doc/General/Security.md b/doc/General/Security.md new file mode 100644 index 0000000000..0419456c4e --- /dev/null +++ b/doc/General/Security.md @@ -0,0 +1,28 @@ +source: General/Security.md +# Security + +### General +Like any good software we take security seriously. However, bugs do make it into the software +along with the history of the code base we inherited. It's how we deal with identified vulnerabilities +that should show that we take things seriously. + +### Securing your install +As with any system of this nature, we highly recommend that you restrict access to the install via +a firewall or VPN. + +It is also highly recommended that the Web interface is protected with an SSL certificate such as one +provided by [LetsEncrypt](http://www.letsencrypt.org). + +Please ensure you keep your install [up to date](Updating.md). + +### Reporting vulnerabilities +Like anyone, we appreciate the work people put in to find flaws in software and welcome anyone +to do so with LibreNMS, this will lead to better quality and more secure software for everyone. + +If you think you've found a vulnerability and want to discuss it with some of the core team then +you can email us at [team@librenms.org](team@librenms.org) and we will endeavour to get back to +as quick as we can, this is usually within 24 hours. + +We are happy to attribute credit to the findings but we ask that we're given a chance to patch +any vulnerability before public disclosure so that our users can update as soon as a fix is +available. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 3824b66f82..c050f76f3e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,6 +34,7 @@ pages: - General/Credits.md - General/Updating.md - General/Releases.md + - General/Security.md - General/Welcome-to-Observium-users.md - Extensions: - Extensions/Alerting.md From 22dca6c103be050fbc5cc8eca771240edc45951c Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Sat, 15 Oct 2016 00:58:19 -0500 Subject: [PATCH 04/13] Add all the sensors --- includes/defaults.inc.php | 1 - .../discovery/sensors/charge/sinetica.inc.php | 55 + .../sensors/current/sinetica.inc.php | 76 ++ .../sensors/frequencies/sinetica.inc.php | 71 + .../discovery/sensors/load/sinetica.inc.php | 44 + .../discovery/sensors/power/sinetica.inc.php | 45 + .../sensors/runtime/sinetica.inc.php | 38 + .../sensors/voltages/sinetica.inc.php | 73 + mibs/mitsubishi/Mitsubishi.mib | 1184 +++++++++++++++++ mibs/mitsubishi/NET-SNMP-MIB | 67 + 10 files changed, 1653 insertions(+), 1 deletion(-) create mode 100644 includes/discovery/sensors/charge/sinetica.inc.php create mode 100644 includes/discovery/sensors/current/sinetica.inc.php create mode 100644 includes/discovery/sensors/frequencies/sinetica.inc.php create mode 100644 includes/discovery/sensors/load/sinetica.inc.php create mode 100644 includes/discovery/sensors/power/sinetica.inc.php create mode 100644 includes/discovery/sensors/runtime/sinetica.inc.php create mode 100644 includes/discovery/sensors/voltages/sinetica.inc.php create mode 100644 mibs/mitsubishi/Mitsubishi.mib create mode 100644 mibs/mitsubishi/NET-SNMP-MIB diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 04fc7aef4c..943fcb390a 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -761,7 +761,6 @@ $config['modules_compat']['rfc1628']['poweralert'] = 1; $config['modules_compat']['rfc1628']['multimatic'] = 1; $config['modules_compat']['rfc1628']['webpower'] = 1; $config['modules_compat']['rfc1628']['huaweiups'] = 1; -$config['modules_compat']['rfc1628']['sinetica'] = 1; // Enable daily updates $config['update'] = 1; diff --git a/includes/discovery/sensors/charge/sinetica.inc.php b/includes/discovery/sensors/charge/sinetica.inc.php new file mode 100644 index 0000000000..7d993e8e4c --- /dev/null +++ b/includes/discovery/sensors/charge/sinetica.inc.php @@ -0,0 +1,55 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + +if ($device['os'] == 'sinetica') { + $charge_oid = '.1.3.6.1.4.1.13891.101.2.4.0'; + $charge = snmp_get($device, $charge_oid, '-Osqnv'); + + if (!empty($charge)) { + $type = 'sinetica'; + $index = 0; + $limit = 100; + $lowlimit = 0; + $lowwarnlimit = 10; + $descr = 'Battery Charge'; + + discover_sensor( + $valid['sensor'], + 'charge', + $device, + $charge_oid, + $index, + $type, + $descr, + 1, + 1, + $lowlimit, + $lowwarnlimit, + null, + $limit, + $charge + ); + } +} diff --git a/includes/discovery/sensors/current/sinetica.inc.php b/includes/discovery/sensors/current/sinetica.inc.php new file mode 100644 index 0000000000..e3f78568db --- /dev/null +++ b/includes/discovery/sensors/current/sinetica.inc.php @@ -0,0 +1,76 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + + +if ($device['os'] == 'sinetica') { + $battery_oid = '.1.3.6.1.4.1.13891.101.2.6.0'; + $battery_current = snmp_get($device, $battery_oid, '-Oqv'); + + if (!empty($battery_current) || $battery_current == 0) { + $divisor = 10; + $current = $battery_current / $divisor; + $descr = 'Battery'; + $type = 'sinetica'; + $index = '2.6.0'; + + discover_sensor($valid['sensor'], 'current', $device, $battery_oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + } + + $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.4.4.1.3', array()); + + foreach ($oids as $oid => $data) { + $current_id = substr($oid, strrpos($oid, '.') + 1); + + $current_oid = ".$oid"; + $descr = 'Output'; + if (count($oids) > 1) { + $descr .= " Phase $current_id"; + } + $divisor = 100; + $current = current($data) / $divisor; + $type = 'sinetica'; + $index = '4.4.1.3.'.$current_id; + + discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + } + + $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.3.3.1.4', array()); + + foreach ($oids as $oid => $data) { + $current_id = substr($oid, strrpos($oid, '.') + 1); + + $current_oid = ".$oid"; + $descr = 'Input'; + if (count($oids) > 1) { + $descr .= " Phase $current_id"; + } + $divisor = 10; + $current = current($data) / $divisor; + $type = 'sinetica'; + $index = '3.3.1.3.'.$current_id; + + discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + } +}//end if diff --git a/includes/discovery/sensors/frequencies/sinetica.inc.php b/includes/discovery/sensors/frequencies/sinetica.inc.php new file mode 100644 index 0000000000..22dcb8ed4e --- /dev/null +++ b/includes/discovery/sensors/frequencies/sinetica.inc.php @@ -0,0 +1,71 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + + +if ($device['os'] == 'sinetica') { + $output_oid = '.1.3.6.1.4.1.13891.101.4.2.0'; + $output_current = snmp_get($device, $output_oid, '-Oqv'); + + if (!empty($output_current) || $output_current == 0) { + $divisor = 10; + $current = $output_current / $divisor; + $descr = 'Output'; + $type = 'sinetica'; + $index = '4.2.0'; + + discover_sensor($valid['sensor'], 'frequency', $device, $output_oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + } + + $bypass_oid = '.1.3.6.1.4.1.13891.101.5.1.0'; + $bypass_current = snmp_get($device, $bypass_oid, '-Oqv'); + + if (!empty($bypass_current) || $bypass_current == 0) { + $divisor = 10; + $current = $bypass_current / $divisor; + $descr = 'Bypass'; + $type = 'sinetica'; + $index = '5.1.0'; + + discover_sensor($valid['sensor'], 'frequency', $device, $bypass_oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + } + + $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.3.3.1.2', array()); + + foreach ($oids as $oid => $data) { + $current_id = substr($oid, strrpos($oid, '.') + 1); + + $current_oid = ".$oid"; + $descr = 'Input'; + if (count($oids) > 1) { + $descr .= " Phase $current_id"; + } + $divisor = 10; + $current = current($data) / $divisor; + $type = 'sinetica'; + $index = '3.3.1.2.'.$current_id; + + discover_sensor($valid['sensor'], 'frequency', $device, $current_oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + } +}//end if diff --git a/includes/discovery/sensors/load/sinetica.inc.php b/includes/discovery/sensors/load/sinetica.inc.php new file mode 100644 index 0000000000..f73edead0d --- /dev/null +++ b/includes/discovery/sensors/load/sinetica.inc.php @@ -0,0 +1,44 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + + +if ($device['os'] == 'sinetica') { + $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.4.4.1.5', array()); + + foreach ($oids as $oid => $data) { + $current_id = substr($oid, strrpos($oid, '.') + 1); + + $current_oid = ".$oid"; + $descr = 'Output'; + if (count($oids) > 1) { + $descr .= " $current_id"; + } + $current = current($data); + $type = 'sinetica'; + $index = '4.4.1.5.' . $current_id; + + discover_sensor($valid['sensor'], 'load', $device, $current_oid, $index, $type, $descr, 1, 1, null, null, null, null, $current); + } +} diff --git a/includes/discovery/sensors/power/sinetica.inc.php b/includes/discovery/sensors/power/sinetica.inc.php new file mode 100644 index 0000000000..bdbe4148a3 --- /dev/null +++ b/includes/discovery/sensors/power/sinetica.inc.php @@ -0,0 +1,45 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + +if ($device['os'] == 'sinetica') { + + $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.4.4.1.4', array()); + + foreach ($oids as $oid => $data) { + $current_id = substr($oid, strrpos($oid, '.') + 1); + + $current_oid = ".$oid"; + $descr = 'Output'; + if (count($oids) > 1) { + $descr .= " Phase $current_id"; + } + $divisor = 10; + $current = current($data) / $divisor; + $type = 'sinetica'; + $index = '4.4.1.4.' . $current_id; + + discover_sensor($valid['sensor'], 'power', $device, $current_oid, $index, $type, $descr, $divisor, 1, null, null, null, null, $current); + } +} diff --git a/includes/discovery/sensors/runtime/sinetica.inc.php b/includes/discovery/sensors/runtime/sinetica.inc.php new file mode 100644 index 0000000000..93d4793bda --- /dev/null +++ b/includes/discovery/sensors/runtime/sinetica.inc.php @@ -0,0 +1,38 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + +if ($device['os'] == 'sinetica') { + $runtime_oid = '.1.3.6.1.4.1.13891.101.2.3.0'; + $runtime = snmp_get($device, $runtime_oid, '-Osqvt'); + + if (!empty($runtime)) { + $type = 'sinetcia'; + $index = '2.3.0'; + $descr = 'Runtime'; + $low_limit = 5; + $low_limit_warn = 10; + discover_sensor($valid['sensor'], 'runtime', $device, $runtime_oid, $index, $type, $descr, 1, 1, $low_limit, $low_limit_warn, null, null, $runtime); + } +}//end if diff --git a/includes/discovery/sensors/voltages/sinetica.inc.php b/includes/discovery/sensors/voltages/sinetica.inc.php new file mode 100644 index 0000000000..9c76d38223 --- /dev/null +++ b/includes/discovery/sensors/voltages/sinetica.inc.php @@ -0,0 +1,73 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2016 Tony Murray + * @author Tony Murray + */ + +if ($device['os'] == 'sinetica') { + $battery_oid = '.1.3.6.1.4.1.13891.101.2.5.0'; + $battery_current = snmp_get($device, $battery_oid, '-Oqv'); + + if (!empty($battery_current) || $battery_current == 0) { + $divisor = 10; + $current = $battery_current / $divisor; + $descr = 'Battery'; + $type = 'sinetica'; + $index = '2.5.0'; + + discover_sensor($valid['sensor'], 'voltage', $device, $battery_oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + } + + $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.3.3.1.3', array()); + + foreach ($oids as $oid => $data) { + $current_id = substr($oid, strrpos($oid, '.') + 1); + + $current_oid = ".$oid"; + $descr = 'Output'; + if (count($oids) > 1) { + $descr .= " Phase $current_id"; + } + $current = current($data); + $type = 'sinetica'; + $index = '3.3.1.3.'.$current_id; + + discover_sensor($valid['sensor'], 'voltage', $device, $current_oid, $index, $type, $descr, 1, 1, null, null, null, null, $current); + } + + $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.4.4.1.2', array()); + + foreach ($oids as $oid => $data) { + $current_id = substr($oid, strrpos($oid, '.') + 1); + + $current_oid = ".$oid"; + $descr = 'Input'; + if (count($oids) > 1) { + $descr .= " Phase $current_id"; + } + $current = current($data); + $type = 'sinetica'; + $index = '4.4.1.2.'.$current_id; + + discover_sensor($valid['sensor'], 'voltage', $device, $current_oid, $index, $type, $descr, 1, '1', null, null, null, null, $current); + } +}//end if diff --git a/mibs/mitsubishi/Mitsubishi.mib b/mibs/mitsubishi/Mitsubishi.mib new file mode 100644 index 0000000000..f1c84ee6bf --- /dev/null +++ b/mibs/mitsubishi/Mitsubishi.mib @@ -0,0 +1,1184 @@ +-- Mitsubishi.mib - MIB file for Mitsubishi UPSs + +UPS-MIB DEFINITIONS ::= BEGIN + +IMPORTS + TRAP-TYPE + FROM RFC-1215 + DisplayString + FROM RFC1213-MIB + OBJECT-TYPE + FROM RFC-1212 + Gauge, Counter, TimeTicks, mgmt + FROM RFC1155-SMI + ; + +PositiveInteger ::= INTEGER +NonNegativeInteger ::= INTEGER +TimeStamp ::= TimeTicks +TimeInterval ::= INTEGER (0..2147483647) +TestAndIncr ::= INTEGER (0..2147483647) +AutonomousType ::= DisplayString + +Tag OBJECT IDENTIFIER ::= { enterprises 13891 } +MitsubishiUPS OBJECT IDENTIFIER ::= { Tag 101 } + +upsIdent OBJECT IDENTIFIER ::= { MitsubishiUPS 1 } + +upsIdentManufacturer OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The name of the UPS manufacturer." + ::= { upsIdent 1 } + +upsIdentModel OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS Model designation." + ::= { upsIdent 2 } + +upsIdentUPSSoftwareVersion OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS firmware/software version(s). This variable + may or may not have the same value as + upsIdentAgentSoftwareVersion in some implementations." + ::= { upsIdent 3 } + +upsIdentAgentSoftwareVersion OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS agent software version. This variable may or may + not have the same value as upsIdentUPSSoftwareVersion in + some implementations." + ::= { upsIdent 4 } + +upsIdentName OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-write + STATUS mandatory + DESCRIPTION + "A string identifying the UPS. This object should be + set by the administrator." + ::= { upsIdent 5 } + +upsIdentAttachedDevices OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-write + STATUS mandatory + DESCRIPTION + "A string identifying the devices attached to the output + of the UPS. This object should be set by the administrator." + ::= { upsIdent 6 } + +upsBattery OBJECT IDENTIFIER ::= { MitsubishiUPS 2 } + +upsBatteryStatus OBJECT-TYPE + SYNTAX INTEGER + { + unknown(1), + batteryNormal(2), + batteryLow(3), + batteryDepleted(4) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The indication of the capacity remaining in the UPS batteries. + A value of batteryNormal indicates a normal battery condition. + A value of batteryLow indicates the remaining battery run-time + will not maintain the output load for an extended period of time. + A value of batteryDepleted indicates that the UPS will be unable + to sustain the present load when and if the utility power is lost." + ::= { upsBattery 1 } + +upsSecondsOnBattery OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS seconds + ACCESS read-only + STATUS mandatory + DESCRIPTION + "If the unit is on battery power, the elapsed time in seconds + since the UPS last switched to battery power, or the time since + the network management system was last restarted, whichever is less. + Zero shall be returned if the unit is not on battery power." + ::= { upsBattery 2 } + +upsEstimatedMinutesRemaining OBJECT-TYPE + SYNTAX PositiveInteger -- UNITS minutes + ACCESS read-only + STATUS mandatory + DESCRIPTION + "An estimate of the time in minutes until the battery is depleted + under the present load conditions if the utility power is off and + remains off, or if it were to be lost and remain off." + ::= { upsBattery 3 } + +upsEstimatedChargeRemaining OBJECT-TYPE + SYNTAX INTEGER -- UNITS percent + ACCESS read-only + STATUS mandatory + DESCRIPTION + "An estimate of the battery charge remaining expressed as a + percent of full charge." + ::= { upsBattery 4 } + +upsBatteryVoltage OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 Volt DC + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The magnitude of the present battery voltage (0.1 Volt DC)." + ::= { upsBattery 5 } + +upsBatteryCurrent OBJECT-TYPE + SYNTAX INTEGER (-2147483648..2147483647) -- UNITS 0.1 Amp DC + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present battery current (0.1 Amp DC)." + ::= { upsBattery 6 } + +upsBatteryTemperature OBJECT-TYPE + SYNTAX INTEGER (-2147483648..2147483647) -- UNITS degrees Centigrade + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The ambient temperature at or near the UPS Battery casing (degrees Centigrade)." + ::= { upsBattery 7 } + +upsInput OBJECT IDENTIFIER ::= { MitsubishiUPS 3 } + +upsInputLineBads OBJECT-TYPE + SYNTAX Counter + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A count of the number of times the input entered an + out-of-tolerance condition as defined by the manufacturer. + This count is incremented by one each time the input + transitions from zero out-of-tolerance lines to one or more + input lines out-of-tolerance." + ::= { upsInput 1 } + +upsInputNumLines OBJECT-TYPE + SYNTAX NonNegativeInteger + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The number of input lines utilized in this device. This + variable indicates the number of rows in the input table." + ::= { upsInput 2 } + +upsInputTable OBJECT-TYPE + SYNTAX SEQUENCE OF UpsInputEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "A list of input table entries. The number of entries + is given by the value of upsInputNumLines." + ::= { upsInput 3 } + +upsInputEntry OBJECT-TYPE + SYNTAX UpsInputEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "An entry containing information applicable to a + particular input line." + INDEX { upsInputLineIndex } + ::= { upsInputTable 1 } + +UpsInputEntry ::= + SEQUENCE + { + upsInputLineIndex PositiveInteger, + upsInputFrequency NonNegativeInteger, + upsInputVoltage NonNegativeInteger, + upsInputCurrent NonNegativeInteger, + upsInputTruePower NonNegativeInteger + } + +upsInputLineIndex OBJECT-TYPE + SYNTAX PositiveInteger + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The input line identifier." + ::= { upsInputEntry 1 } + +upsInputFrequency OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 Hertz + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present input frequency (0.1 Hertz)." + ::= { upsInputEntry 2 } + +upsInputVoltage OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 RMS Volt + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The magnitude of the present input voltage (0.1 RMS Volt)." + ::= { upsInputEntry 3 } + +upsInputCurrent OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 RMS Amp + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The magnitude of the present input current (0.1 RMS Amp)." + ::= { upsInputEntry 4 } + +upsInputTruePower OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS Watts + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The magnitude of the present input true power (watts)." + ::= { upsInputEntry 5 } + +upsOutput OBJECT IDENTIFIER ::= { MitsubishiUPS 4 } + +upsOutputSource OBJECT-TYPE + SYNTAX INTEGER + { + other(1), + none(2), + normal(3), + bypass(4), + battery(5), + booster(6), + reducer(7) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present source of output power. A value of none (2) indicates + there is no source of output power (and therefore no output power), + for example, the system has opened the output breaker." + ::= { upsOutput 1 } + +upsOutputFrequency OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 Hertz + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present output frequency (0.1 Hertz)." + ::= { upsOutput 2 } + +upsOutputNumLines OBJECT-TYPE + SYNTAX NonNegativeInteger + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The number of output lines utilized in this device. This + variable indicates the number of rows in the output table." + ::= { upsOutput 3 } + +upsOutputTable OBJECT-TYPE + SYNTAX SEQUENCE OF UpsOutputEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "A list of output table entries. The number of + entries is given by the value of upsOutputNumLines." + ::= { upsOutput 4 } + +upsOutputEntry OBJECT-TYPE + SYNTAX UpsOutputEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "An entry containing information applicable to a + particular output line." + INDEX { upsOutputLineIndex } + ::= { upsOutputTable 1 } + +UpsOutputEntry ::= + SEQUENCE + { + upsOutputLineIndex PositiveInteger, + upsOutputVoltage NonNegativeInteger, + upsOutputCurrent NonNegativeInteger, + upsOutputPower NonNegativeInteger, + upsOutputPercentLoad INTEGER + } + +upsOutputLineIndex OBJECT-TYPE + SYNTAX PositiveInteger + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The output line identifier." + ::= { upsOutputEntry 1 } + +upsOutputVoltage OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 RMS Volts + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present output voltage (0.1 RMS Volt)." + ::= { upsOutputEntry 2 } + +upsOutputCurrent OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 RMS Amp + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present output current (0.1 RMS Amp)." + ::= { upsOutputEntry 3 } + +upsOutputPower OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS Watts + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present output true power (watts)." + ::= { upsOutputEntry 4 } + +upsOutputPercentLoad OBJECT-TYPE + SYNTAX INTEGER -- UNITS percent + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The percentage of the UPS power capacity presently being + used on this output line (the greater of the percent load + of true power capacity and the percent load of VA." + ::= { upsOutputEntry 5 } + +upsBypass OBJECT IDENTIFIER ::= { MitsubishiUPS 5 } + +upsBypassFrequency OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 Hertz + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present bypass frequency." + ::= { upsBypass 1 } + +upsBypassNumLines OBJECT-TYPE + SYNTAX NonNegativeInteger + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The number of bypass lines utilized in this device. This + entry indicates the number of rows in the bypass table." + ::= { upsBypass 2 } + +upsBypassTable OBJECT-TYPE + SYNTAX SEQUENCE OF UpsBypassEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "A list of bypass table entries. The number of entries + is given by the value of upsBypassNumLines." + ::= { upsBypass 3 } + +upsBypassEntry OBJECT-TYPE + SYNTAX UpsBypassEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "An entry containing information applicable to a + particular bypass input." + INDEX { upsBypassLineIndex } + ::= { upsBypassTable 1 } + +UpsBypassEntry ::= + SEQUENCE + { + upsBypassLineIndex PositiveInteger, + upsBypassVoltage NonNegativeInteger, + upsBypassCurrent NonNegativeInteger, + upsBypassPower NonNegativeInteger + } + +upsBypassLineIndex OBJECT-TYPE + SYNTAX PositiveInteger + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The bypass line identifier." + ::= { upsBypassEntry 1 } + +upsBypassVoltage OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 RMS Volts + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present bypass voltage (0.1 RMS Volt)." + ::= { upsBypassEntry 2 } + +upsBypassCurrent OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 RMS Amp + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present bypass current (0.1 RMS Amp)." + ::= { upsBypassEntry 3 } + +upsBypassPower OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS Watts + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present true power conveyed by the bypass (watts)." + ::= { upsBypassEntry 4 } + +upsAlarm OBJECT IDENTIFIER ::= { MitsubishiUPS 6 } + +upsAlarmsPresent OBJECT-TYPE + SYNTAX Gauge + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The present number of active alarm conditions." + ::= { upsAlarm 1 } + +upsAlarmTable OBJECT-TYPE + SYNTAX SEQUENCE OF UpsAlarmEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "A list of alarm table entries. Alarms are named by + an OBJECT IDENTIFIER, upsAlarmDescr, to allow a single + table to reflect well known alarms plus alarms defined + by a particular implementation, i.e., as documented in + the private enterprise MIB definition for the device. + No two rows will have the same value of upsAlarmDescr, + since alarms define conditions. In order to meet this + requirement, care should be taken in the definition of + alarm conditions to insure that a system cannot enter + the same condition multiple times simultaneously. + + The number of rows in the table at any given time is + reflected by the value of upsAlarmsPresent." + ::= { upsAlarm 2 } + +upsAlarmEntry OBJECT-TYPE + SYNTAX UpsAlarmEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "An entry containing information applicable to a + particular alarm." + INDEX { upsAlarmId } + ::= { upsAlarmTable 1 } + +UpsAlarmEntry ::= + SEQUENCE + { + upsAlarmId PositiveInteger, + upsAlarmDescr AutonomousType, + upsAlarmTime TimeStamp + } + +upsAlarmId OBJECT-TYPE + SYNTAX PositiveInteger + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A unique identifier for an alarm condition. This + value must remain constant." + ::= { upsAlarmEntry 1 } + +upsAlarmDescr OBJECT-TYPE + SYNTAX AutonomousType + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A reference to an alarm description object. The object + referenced should not be accessible, but rather be used + to provide a unique description of the alarm condition." + ::= { upsAlarmEntry 2 } + +upsAlarmTime OBJECT-TYPE + SYNTAX TimeStamp + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The value of sysUpTime when the alarm condition was + detected. If the alarm condition was detected at the + time of agent startup and presumably existed before + agent startup, the value of upsAlarmTime shall equal 0." + ::= { upsAlarmEntry 3 } + + upsAlarmID OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A unique identifier for an alarm condition. This + value must remain constant." + ::= { upsAlarm 4 } + + upsAlarmDESCR OBJECT-TYPE + SYNTAX DisplayString (SIZE(0..63)) + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A reference to an alarm description object. The object + references should not be accessible, but rather be used + to provide a unique description of the alarm condition." + ::= { upsAlarm 5 } + +upsWellKnownAlarms OBJECT IDENTIFIER ::= { upsAlarm 3 } + +upsAlarmBatteryBad OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "One or more batteries have been determined to require + replacement." + ::= { upsWellKnownAlarms 1 } + +upsAlarmOnBattery OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS is drawing power from the batteries." + ::= { upsWellKnownAlarms 2 } + + upsAlarmLowBattery OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The remaining battery run-time is less than or equal + to upsConfigLowBattTime." + ::= { upsWellKnownAlarms 3 } + + upsAlarmDepletedBattery OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS will be unable to sustain the present load + when and if the utility power is lost." + ::= { upsWellKnownAlarms 4 } + + upsAlarmTempBad OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A temperature is out of tolerance." + ::= { upsWellKnownAlarms 5 } + + upsAlarmInputBad OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "An input condition is out of tolerance." + ::= { upsWellKnownAlarms 6 } + + upsAlarmOutputBad OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "An output condition (other than OutputOverload) is + out of tolerance." + ::= { upsWellKnownAlarms 7 } + + upsAlarmOutputOverload OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The output load exceeds the UPS output capacity." + ::= { upsWellKnownAlarms 8 } + + upsAlarmOnBypass OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The Bypass is presently engaged on the UPS." + ::= { upsWellKnownAlarms 9 } + + upsAlarmBypassBad OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The Bypass is out of tolerance." + ::= { upsWellKnownAlarms 10 } + + upsAlarmOutputOffAsRequested OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS has shut down as requested, i.e., the output + is off." + ::= { upsWellKnownAlarms 11 } + +upsAlarmUpsOffAsRequested OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The entire UPS has shutdown as commanded." + ::= { upsWellKnownAlarms 12 } + +upsAlarmChargerFailed OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "An uncorrected problem has been detected within the + UPS charger subsystem." + ::= { upsWellKnownAlarms 13 } + +upsAlarmUpsOutputOff OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The output of the UPS is in the off state." + ::= { upsWellKnownAlarms 14 } + +upsAlarmUpsSystemOff OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS system is in the off state." + ::= { upsWellKnownAlarms 15 } + +upsAlarmFanFailure OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The failure of one or more fans in the UPS has been + detected." + ::= { upsWellKnownAlarms 16 } + +upsAlarmFuseFailure OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The failure of one or more fuses has been detected." + ::= { upsWellKnownAlarms 17 } + +upsAlarmGeneralFault OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A general fault in the UPS has been detected." + ::= { upsWellKnownAlarms 18 } + + upsAlarmDiagnosticTestFailed OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The result of the last diagnostic test indicates a + failure." + ::= { upsWellKnownAlarms 19 } + + upsAlarmCommunicationsLost OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A problem has been encountered in the + communications between the agent and the UPS." + ::= { upsWellKnownAlarms 20 } + +upsAlarmAwaitingPower OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS output is off and the UPS is awaiting the + return of input power." + ::= { upsWellKnownAlarms 21 } + + upsAlarmShutdownPending OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A upsShutdownAfterDelay countdown is underway." + ::= { upsWellKnownAlarms 22 } + + upsAlarmShutdownImminent OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The UPS will turn off power to the load in less than + 5 seconds; this may be either a timed shutdown or a + low battery shutdown." + ::= { upsWellKnownAlarms 23 } + + upsAlarmTestInProgress OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A test is in progress, as initiated and indicated by + the Test Group. Tests initiated via other + implementation-specific mechanisms can indicate the + presence of the testing in the alarm table, if + desired, via a OBJECT-TYPE macro in the MIB + document specific to that implementation and are + outside the scope of this OBJECT-TYPE." + ::= { upsWellKnownAlarms 24 } + +upsTest OBJECT IDENTIFIER ::= { MitsubishiUPS 7 } + + upsTestId OBJECT-TYPE + SYNTAX OBJECT IDENTIFIER + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The test named by an OBJECT IDENTIFIER which + allows a standard mechanism for the initiation of + a test, including the well known tests identified in + this document." + ::= { upsTest 1 } + +upsTestSpinLock OBJECT-TYPE + SYNTAX TestAndIncr + ACCESS read-write + STATUS mandatory + DESCRIPTION + "A spin lock on the test subsystem." + ::= { upsTest 2 } + +upsTestResultsSummary OBJECT-TYPE + SYNTAX INTEGER + { + donePass(1), + doneWarning(2), + doneError(3), + aborted(4), + inProgress(5), + noTestsInitiated(6) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The results of the current or last UPS diagnostics + test performed. The values for donePass(1), + doneWarning(2), and doneError(3) indicate that the + test completed either successfully, with a warning, or + with an error, respectively. The value aborted(4) is + returned for tests which are aborted by setting the + value of upsTestId to upsTestAbortTestInProgress. + Tests which have not yet concluded are indicated by + inProgress(5). The value noTestsInitiated(6) + indicates that no previous test results are available, + such as is the case when no tests have been run since + the last reinitialization of the network management + subsystem and the system has no provision for non- + volatile storage of test results." + ::= { upsTest 3 } + +upsTestResultsDetail OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Additional information about upsTestResultsSummary. + If no additional information available, a zero length + string is returned." + ::= { upsTest 4 } + +upsTestStartTime OBJECT-TYPE + SYNTAX TimeStamp + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The value of sysUpTime at the time the test in + progress was initiated, or, if no test is in progress, + the time the previous test was initiated. If the + value of upsTestResultsSummary is noTestsInitiated(6), + upsTestStartTime has the value 0." + ::= { upsTest 5 } + +upsTestElapsedTime OBJECT-TYPE + SYNTAX TimeInterval + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The amount of time, in TimeTicks, since the test in + progress was initiated, or, if no test is in progress, + the previous test took to complete. If the value of + upsTestResultsSummary is noTestsInitiated(6), + upsTestElapsedTime has the value 0." + ::= { upsTest 6 } + +upsWellKnownTests OBJECT IDENTIFIER ::= { upsTest 7 } + +upsTestNoTestsInitiated OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "No tests have been initiated and no test is in progress." + ::= { upsWellKnownTests 1 } + +upsTestAbortTestInProgress OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The test in progress is to be aborted / the test in + progress was aborted." + ::= { upsWellKnownTests 2 } + +upsTestGeneralSystemsTest OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The manufacturer's standard test of UPS device systems." + ::= { upsWellKnownTests 3 } + +upsTestQuickBatteryTest OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A test that is sufficient to determine if the battery + needs replacement." + ::= { upsWellKnownTests 4 } + +upsTestDeepBatteryCalibration OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The system is placed on battery to a discharge level, + set by the manufacturer, sufficient to determine + battery replacement and battery run-time with a high + degree of confidence. WARNING: this test will leave + the battery in a low charge state and will require + time for recharging to a level sufficient to provide + normal battery duration for the protected load." + ::= { upsWellKnownTests 5 } + +upsControl OBJECT IDENTIFIER ::= { MitsubishiUPS 8 } + +upsShutdownType OBJECT-TYPE + SYNTAX INTEGER + { + output(1), + system(2) + } + ACCESS read-write + STATUS mandatory + DESCRIPTION + "This object determines the nature of the action to be + taken at the time when the countdown of the + upsShutdownAfterDelay and upsRebootWithDuration + objects reaches zero. + + Setting this object to output(1) indicates that + shutdown requests should cause only the output of the + UPS to turn off. Setting this object to system(2) + indicates that shutdown requests will cause the entire + UPS system to turn off." + ::= { upsControl 1 } + +upsShutdownAfterDelay OBJECT-TYPE + SYNTAX INTEGER -- UNITS seconds + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Setting this object will shutdown (i.e., turn off) + either the UPS output or the UPS system (as determined + by the value of upsShutdownType at the time of + shutdown) after the indicated number of seconds, or + less if the UPS batteries become depleted. Setting + this object to 0 will cause the shutdown to occur + immediately. Setting this object to -1 will abort the + countdown. If the system is already in the desired + state at the time the countdown reaches 0, then + nothing will happen. That is, there is no additional + action at that time if upsShutdownType = system and + the system is already off. Similarly, there is no + additional action at that time if upsShutdownType = + output and the output is already off. When read, + upsShutdownAfterDelay will return the number of + seconds remaining until shutdown, or -1 if no shutdown + countdown is in effect. On some systems, if the agent + is restarted while a shutdown countdown is in effect, + the countdown may be aborted. Sets to this object + override any upsShutdownAfterDelay already in effect." + ::= { upsControl 2 } + +upsStartupAfterDelay OBJECT-TYPE + SYNTAX INTEGER -- UNITS seconds + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Setting this object will start the output after the + indicated number of seconds, including starting the + UPS, if necessary. Setting this object to 0 will + cause the startup to occur immediately. Setting this + object to -1 will abort the countdown. If the output + is already on at the time the countdown reaches 0, + then nothing will happen. Sets to this object + override the effect of any upsStartupAfterDelay + countdown or upsRebootWithDuration countdown in + progress. When read, upsStartupAfterDelay will return + the number of seconds until startup, or -1 if no + startup countdown is in effect. If the countdown + expires during a utility failure, the startup shall + not occur until the utility power is restored. On + some systems, if the agent is restarted while a + startup countdown is in effect, the countdown is + aborted." + ::= { upsControl 3 } + +upsRebootWithDuration OBJECT-TYPE + SYNTAX INTEGER -- UNITS seconds + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Setting this object will immediately shutdown (i.e., + turn off) either the UPS output or the UPS system (as + determined by the value of upsShutdownType at the time + of shutdown) for a period equal to the indicated + number of seconds, after which time the output will be + started, including starting the UPS, if necessary. If + the number of seconds required to perform the request + is greater than the requested duration, then the + requested shutdown and startup cycle shall be + performed in the minimum time possible, but in no case + shall this require more than the requested duration + plus 60 seconds. When read, upsRebootWithDuration + shall return the number of seconds remaining in the + countdown, or -1 if no countdown is in progress. If + the startup should occur during a utility failure, the + startup shall not occur until the utility power is + restored." + ::= { upsControl 4 } + +upsAutoRestart OBJECT-TYPE + SYNTAX INTEGER + { + on(1), + off(2) + } + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Setting this object to 'on' will cause the UPS system + to restart after a shutdown if the shutdown occurred + during a power loss as a result of either a + upsShutdownAfterDelay or an internal battery depleted + condition. Setting this object to 'off' will prevent + the UPS system from restarting after a shutdown until + an operator manually or remotely explicitly restarts + it. If the UPS is in a startup or reboot countdown, + then the UPS will not restart until that delay has + been satisfied." + ::= { upsControl 5 } + +upsConfig OBJECT IDENTIFIER ::= { MitsubishiUPS 9 } + +upsConfigInputVoltage OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS RMS Volts + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The magnitude of the nominal input voltage (RMS Volts). + On those systems which support read-write access to this + object, if there is an attempt to set this variable to + a value that is not supported, the request must be + rejected and the agent shall respond with an + appropriate error message, i.e., badValue for SNMPv1, + or inconsistentValue for SNMPv2." + ::= { upsConfig 1 } + +upsConfigInputFreq OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 Hertz + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The nominal input frequency (0.1 Hertz). On those systems + which support read-write access to this object, if there is + an attempt to set this variable to a value that is not + supported, the request must be rejected and the agent + shall respond with an appropriate error message, i.e., + badValue for SNMPv1, or inconsistentValue for SNMPv2." + ::= { upsConfig 2 } + +upsConfigOutputVoltage OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS RMS Volts + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The magnitude of the nominal output voltage (RMS Volts). + On those systems which support read-write access to this + object, if there is an attempt to set this variable to + a value that is not supported, the request must be + rejected and the agent shall respond with an + appropriate error message, i.e., badValue for SNMPv1, + or inconsistentValue for SNMPv2." + ::= { upsConfig 3 } + +upsConfigOutputFreq OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS 0.1 Hertz + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The nominal output frequency (0.1 Hertz). On those systems + which support read-write access to this object, if there is + an attempt to set this variable to a value that is not + supported, the request must be rejected and the agent + shall respond with an appropriate error message, i.e., + badValue for SNMPv1, or inconsistentValue for SNMPv2." + ::= { upsConfig 4 } + +upsConfigOutputVA OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS Volt-Amps + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The magnitude of the nominal Volt-Amp rating (Volt-Amps)." + ::= { upsConfig 5 } + +upsConfigOutputPower OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS Watts + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The magnitude of the nominal true power rating (watts)." + ::= { upsConfig 6 } + +upsConfigLowBattTime OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS minutes + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The value of upsEstimatedMinutesRemaining at which a + lowBattery condition is declared. For agents which + support only discrete (discontinuous) values, then the + agent shall round up to the next supported value. If + the requested value is larger than the largest + supported value, then the largest supported value + shall be selected." + ::= { upsConfig 7 } + +upsConfigAudibleStatus OBJECT-TYPE + SYNTAX INTEGER + { + disabled(1), + enabled(2), + muted(3) + } + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The requested state of the audible alarm. When in + the disabled state, the audible alarm should never + sound. The enabled state is self-describing. Setting + this object to muted(3) when the audible alarm is + sounding shall temporarily silence the alarm. It will + remain muted until it would normally stop sounding and + the value returned for read operations during this + period shall equal muted(3). At the end of this + period, the value shall revert to enabled(2). Writes + of the value muted(3) when the audible alarm is not + sounding shall be accepted but otherwise shall have no + effect." + ::= { upsConfig 8 } + +upsConfigLowVoltageTransferPoint OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS RMS Volts + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The minimum input line voltage (RMS Volts) allowed before + the UPS system transfers to battery backup." + ::= { upsConfig 9 } + +upsConfigHighVoltageTransferPoint OBJECT-TYPE + SYNTAX NonNegativeInteger -- UNITS RMS Volts + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The maximum line voltage (RMS Volts) allowed before the UPS + system transfers to battery backup." + ::= { upsConfig 10 } + +-- UPS trap information group +upsTrapInfo OBJECT IDENTIFIER ::= { MitsubishiUPS 10 } + +trapCode OBJECT-TYPE + SYNTAX Unsigned32 + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A number identifying the event for that last trap that was sent." + ::= { upsTrapInfo 1 } + +trapDescription OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..63)) + ACCESS read-only + STATUS mandatory + DESCRIPTION + "A string identifying the event for that last trap that was sent." + ::= { upsTrapInfo 2 } + +-- UPS Traps +-- upsTraps OBJECT IDENTIFIER ::= { Tag 101 } + +alarmCritical TRAP-TYPE + ENTERPRISE MitsubishiUPS + VARIABLES { trapCode, trapDescription } + DESCRIPTION + "Critical alarm." + ::= 1 + +alarmWarning TRAP-TYPE + ENTERPRISE MitsubishiUPS + VARIABLES { trapCode, trapDescription } + DESCRIPTION + "Warning alarm." + ::= 2 + +alarmInformation TRAP-TYPE + ENTERPRISE MitsubishiUPS + VARIABLES { trapCode, trapDescription } + DESCRIPTION + "Information alarm." + ::= 3 + +upsAlarmCleared TRAP-TYPE + ENTERPRISE MitsubishiUPS + VARIABLES { trapCode, trapDescription } + DESCRIPTION + "Alarm cleared." + ::= 4 + +upsTrapInitialization TRAP-TYPE + ENTERPRISE MitsubishiUPS + VARIABLES { upsIdentName } + DESCRIPTION + "This trap is sent each time a NetCom device is initialized." + ::= 5 + +END diff --git a/mibs/mitsubishi/NET-SNMP-MIB b/mibs/mitsubishi/NET-SNMP-MIB new file mode 100644 index 0000000000..f7b0fbae5d --- /dev/null +++ b/mibs/mitsubishi/NET-SNMP-MIB @@ -0,0 +1,67 @@ +NET-SNMP-MIB DEFINITIONS ::= BEGIN + +-- +-- Top-level infrastructure of the Net-SNMP project enterprise MIB tree +-- + +IMPORTS + MODULE-IDENTITY, enterprises FROM SNMPv2-SMI; + +netSnmp MODULE-IDENTITY + LAST-UPDATED "200201300000Z" + ORGANIZATION "www.net-snmp.org" + CONTACT-INFO + "postal: Wes Hardaker + P.O. Box 382 + Davis CA 95617 + + email: net-snmp-coders@lists.sourceforge.net" + DESCRIPTION + "Top-level infrastructure of the Net-SNMP project enterprise MIB tree" + REVISION "200201300000Z" + DESCRIPTION + "First draft" + ::= { enterprises 8072} + + +-- +-- Net-SNMP enterprise-specific management objects +-- + +netSnmpObjects OBJECT IDENTIFIER ::= {netSnmp 1} +-- netSnmpExamples OBJECT IDENTIFIER ::= {netSnmp 2} +netSnmpEnumerations OBJECT IDENTIFIER ::= {netSnmp 3} +netSnmpModuleIDs OBJECT IDENTIFIER ::= {netSnmpEnumerations 1} +netSnmpAgentOIDs OBJECT IDENTIFIER ::= {netSnmpEnumerations 2} +netSnmpDomains OBJECT IDENTIFIER ::= {netSnmpEnumerations 3} +netSnmpExperimental OBJECT IDENTIFIER ::= {netSnmp 9999} + +-- +-- A subtree specifically designed for private testing purposes. +-- No "public" management objects should ever be defined within this tree. +-- +-- It is provided for private experimentation, prior to transferring a MIB +-- structure to another part of the overall OID tree +-- +netSnmpPlaypen OBJECT IDENTIFIER ::= {netSnmpExperimental 9999} + + +-- +-- Notifications +-- + +netSnmpNotificationPrefix OBJECT IDENTIFIER ::= {netSnmp 4} +netSnmpNotifications OBJECT IDENTIFIER ::= {netSnmpNotificationPrefix 0} +netSnmpNotificationObjects OBJECT IDENTIFIER ::= {netSnmpNotificationPrefix 1} + + +-- +-- Conformance +-- (No laughing at the back!) +-- + +netSnmpConformance OBJECT IDENTIFIER ::= {netSnmp 5} +netSnmpCompliances OBJECT IDENTIFIER ::= {netSnmpConformance 1} +netSnmpGroups OBJECT IDENTIFIER ::= {netSnmpConformance 2} + +END From 28290187f93ab91e85dbf8502292de564e37af3c Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Sat, 15 Oct 2016 08:49:41 -0500 Subject: [PATCH 05/13] Fix style issue --- includes/discovery/sensors/power/sinetica.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/discovery/sensors/power/sinetica.inc.php b/includes/discovery/sensors/power/sinetica.inc.php index bdbe4148a3..a0a6355397 100644 --- a/includes/discovery/sensors/power/sinetica.inc.php +++ b/includes/discovery/sensors/power/sinetica.inc.php @@ -24,7 +24,6 @@ */ if ($device['os'] == 'sinetica') { - $oids = snmpwalk_cache_oid_num($device, '.1.3.6.1.4.1.13891.101.4.4.1.4', array()); foreach ($oids as $oid => $data) { From 6a876295f0715d95bb7336373388005798439535 Mon Sep 17 00:00:00 2001 From: Alexander Kratzsch Date: Thu, 29 Sep 2016 11:40:51 +0200 Subject: [PATCH 06/13] Add -r flag to virsh to connect in readonly mode. The script should only read information, not change anything. --- includes/discovery/libvirt-vminfo.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/discovery/libvirt-vminfo.inc.php b/includes/discovery/libvirt-vminfo.inc.php index 40c5263c3a..37b26b0031 100644 --- a/includes/discovery/libvirt-vminfo.inc.php +++ b/includes/discovery/libvirt-vminfo.inc.php @@ -31,7 +31,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') { if ($ssh_ok || !strstr($method, 'ssh')) { // Fetch virtual machine list unset($domlist); - exec($config['virsh'].' -c '.$uri.' list', $domlist); + exec($config['virsh'].' -rc '.$uri.' list', $domlist); foreach ($domlist as $dom) { list($dom_id,) = explode(' ', trim($dom), 2); @@ -39,7 +39,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') { if (is_numeric($dom_id)) { // Fetch the Virtual Machine information. unset($vm_info_array); - exec($config['virsh'].' -c '.$uri.' dumpxml '.$dom_id, $vm_info_array); + exec($config['virsh'].' -rc '.$uri.' dumpxml '.$dom_id, $vm_info_array); // // moo.example.com @@ -67,7 +67,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') { $vmwVmGuestOS = ''; // libvirt does not supply this $vmwVmMemSize = ($xml->currentMemory / 1024); - exec($config['virsh'].' -c '.$uri.' domstate '.$dom_id, $vm_state); + exec($config['virsh'].' -rc '.$uri.' domstate '.$dom_id, $vm_state); $vmwVmState = ucfirst($vm_state[0]); $vmwVmCpus = $xml->vcpu; From 6fb43d4ee07b5740f6f8267c3606668c93e421f9 Mon Sep 17 00:00:00 2001 From: Alexander Kratzsch Date: Thu, 29 Sep 2016 13:35:14 +0200 Subject: [PATCH 07/13] Make the parser read in the correct values (at least for my setup) --- includes/discovery/libvirt-vminfo.inc.php | 28 +++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/includes/discovery/libvirt-vminfo.inc.php b/includes/discovery/libvirt-vminfo.inc.php index 37b26b0031..f3ff562065 100644 --- a/includes/discovery/libvirt-vminfo.inc.php +++ b/includes/discovery/libvirt-vminfo.inc.php @@ -66,10 +66,34 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') { $vmwVmDisplayName = $xml->name; $vmwVmGuestOS = ''; // libvirt does not supply this - $vmwVmMemSize = ($xml->currentMemory / 1024); exec($config['virsh'].' -rc '.$uri.' domstate '.$dom_id, $vm_state); $vmwVmState = ucfirst($vm_state[0]); - $vmwVmCpus = $xml->vcpu; + + $vmwVmCpus = null; + $vmwVmMemSize = null; + if ($xml->xpath("//sysinfo/system/entry[@name='manufacturer'][.='oVirt']")) { + d_echo("Parsing information for $vmwVmDisplayName with oVirt quirx"); + // oVirt does not fully comply with the example above + switch ($xml->memory['unit']) { + case 'MiB': + $vmwVmMemSize = $xml->memory; + break; + case 'GiB': + $vmwVmMemSize = $xml->memory * 1024; + break; + default: + // includes KiB + $vmwVmMemSize = $xml->memory / 1024; + break; + } + $vmwVmCpus = $xml->vcpu['current']; + if (!isset($vmwVmCpus)) { + $vmwVmCpus = $xml->vcpu; + } + } else { + $vmwVmMemSize = ($xml->currentMemory / 1024); + $vmwVmCpus = $xml->vcpu; + } // Check whether the Virtual Machine is already known for this host. $result = dbFetchRow("SELECT * FROM `vminfo` WHERE `device_id` = ? AND `vmwVmVMID` = ? AND `vm_type` = 'libvirt'", array($device['device_id'], $dom_id)); From 972b9819157203dd258f760f11492952fef662d0 Mon Sep 17 00:00:00 2001 From: Alexander Kratzsch Date: Thu, 29 Sep 2016 14:23:53 +0200 Subject: [PATCH 08/13] I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index a69824430f..f0c77e9f80 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -140,6 +140,7 @@ LibreNMS contributors: - Layne Breitkreutz (Gorian) - Karl Shea (karlshea) - Justin Settle (jquagga) +- Alexander Kratzsch (klump) [1]: http://observium.org/ "Observium web site" Observium was written by: From 74f04fa83d71ce608077e6d22515c2e94b15f12d Mon Sep 17 00:00:00 2001 From: Alexander Kratzsch Date: Thu, 6 Oct 2016 18:58:21 +0200 Subject: [PATCH 09/13] Use the value of the `memory` element with appropriate unit conversion. For the amount of CPUs, use the `current` attribute of `vcpu` but fall back on its value if it does not exist. --- includes/discovery/libvirt-vminfo.inc.php | 64 +++++++++++++++-------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/includes/discovery/libvirt-vminfo.inc.php b/includes/discovery/libvirt-vminfo.inc.php index f3ff562065..9e46212ff4 100644 --- a/includes/discovery/libvirt-vminfo.inc.php +++ b/includes/discovery/libvirt-vminfo.inc.php @@ -41,6 +41,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') { unset($vm_info_array); exec($config['virsh'].' -rc '.$uri.' dumpxml '.$dom_id, $vm_info_array); + // Example xml: // // moo.example.com // 48cf6378-6fd5-4610-0611-63dd4b31cfd6 @@ -54,6 +55,8 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') { // // // (...) + // See spec at https://libvirt.org/formatdomain.html + // Convert array to string unset($vm_info_xml); foreach ($vm_info_array as $line) { @@ -69,31 +72,46 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == 'linux') { exec($config['virsh'].' -rc '.$uri.' domstate '.$dom_id, $vm_state); $vmwVmState = ucfirst($vm_state[0]); - $vmwVmCpus = null; - $vmwVmMemSize = null; - if ($xml->xpath("//sysinfo/system/entry[@name='manufacturer'][.='oVirt']")) { - d_echo("Parsing information for $vmwVmDisplayName with oVirt quirx"); - // oVirt does not fully comply with the example above - switch ($xml->memory['unit']) { - case 'MiB': - $vmwVmMemSize = $xml->memory; - break; - case 'GiB': - $vmwVmMemSize = $xml->memory * 1024; - break; - default: - // includes KiB - $vmwVmMemSize = $xml->memory / 1024; - break; - } - $vmwVmCpus = $xml->vcpu['current']; - if (!isset($vmwVmCpus)) { - $vmwVmCpus = $xml->vcpu; - } - } else { - $vmwVmMemSize = ($xml->currentMemory / 1024); + $vmwVmCpus = $xml->vcpu['current']; + if (!isset($vmwVmCpus)) { $vmwVmCpus = $xml->vcpu; } + $vmwVmMemSize = $xml->memory; + // Convert memory size to MiB + switch ($vmwVmMemSize['unit']) { + case 'T': + case 'TiB': + $vmwVmMemSize = $vmwVmMemSize * 1048576; + break; + case 'TB': + $vmwVmMemSize = $vmwVmMemSize * 1000000; + break; + case 'G': + case 'GiB': + $vmwVmMemSize = $vmwVmMemSize * 1024; + break; + case 'GB': + $vmwVmMemSize = $vmwVmMemSize * 1000; + break; + case 'M': + case 'MiB': + $vmwVmMemSize = $vmwVmMemSize; + break; + case 'MB': + $vmwVmMemSize = $vmwVmMemSize * 1000000 / 1048576; + break; + case 'KB': + $vmwVmMemSize = $vmwVmMemSize / 1000; + break; + case 'b': + case 'bytes': + $vmwVmMemSize = $vmwVmMemSize / 1048576; + break; + default: + // KiB or k or no value + $vmwVmMemSize = $vmwVmMemSize / 1024; + break; + } // Check whether the Virtual Machine is already known for this host. $result = dbFetchRow("SELECT * FROM `vminfo` WHERE `device_id` = ? AND `vmwVmVMID` = ? AND `vm_type` = 'libvirt'", array($device['device_id'], $dom_id)); From 1d11753c5d70d733b0325a59da9886a11ff2106a Mon Sep 17 00:00:00 2001 From: Justin Settle Date: Mon, 17 Oct 2016 10:51:50 -0400 Subject: [PATCH 10/13] Add UBNT-UniFi-MIB Located at: http://dl.ubnt-ut.com/snmp/UBNT-MIB Needed for MIB based polling --- mibs/UBNT-UniFi-MIB | 606 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 606 insertions(+) create mode 100644 mibs/UBNT-UniFi-MIB diff --git a/mibs/UBNT-UniFi-MIB b/mibs/UBNT-UniFi-MIB new file mode 100644 index 0000000000..b064a77ee6 --- /dev/null +++ b/mibs/UBNT-UniFi-MIB @@ -0,0 +1,606 @@ +UBNT-UniFi-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, Integer32, Unsigned32, Counter32, Gauge32, IpAddress, enterprises + FROM SNMPv2-SMI + TEXTUAL-CONVENTION, DisplayString, MacAddress, DateAndTime, TruthValue + FROM SNMPv2-TC + MODULE-COMPLIANCE, OBJECT-GROUP + FROM SNMPv2-CONF + ubntMIB, ubntUniFi, ubntUniFiGroups + FROM UBNT-MIB; + +ubntUniFi MODULE-IDENTITY + LAST-UPDATED "201606250000Z" + ORGANIZATION "Ubiquiti Networks, Inc." + CONTACT-INFO "support@ubnt.com" + DESCRIPTION "The UniFi MIB module for Ubiquiti Networks, Inc. entities" + REVISION "201606250000Z" + DESCRIPTION "Initial Revision." + ::= { ubntMIB 6 } + +unifiApWireless OBJECT IDENTIFIER ::= { ubntUniFi 1 } +unifiApIf OBJECT IDENTIFIER ::= { ubntUniFi 2 } +unifiApSystem OBJECT IDENTIFIER ::= { ubntUniFi 3 } + + +TableIndex ::= TEXTUAL-CONVENTION + DISPLAY-HINT "d" + STATUS current + DESCRIPTION + "A unique value, greater than zero. It is recommended + that values are assigned contiguously starting from 1." + SYNTAX Integer32 (1..2147483647) + + +ObjectIndex ::= TEXTUAL-CONVENTION + DISPLAY-HINT "x" + STATUS current + DESCRIPTION "Internal " + SYNTAX Integer32 (0..2147483647) +-- SYNTAX Integer32 (-2147483648..2147483647) +-- SYNTAX Unsigned32 (0..4294967295) + +Voltage ::= TEXTUAL-CONVENTION + DISPLAY-HINT "d-2" + STATUS current + DESCRIPTION "" + SYNTAX Integer32 (-2147483648..2147483647) + +Temperature ::= TEXTUAL-CONVENTION + DISPLAY-HINT "d-1" + STATUS current + DESCRIPTION "" + SYNTAX Integer32 (-2147483648..2147483647) + +unifiIfTable OBJECT-TYPE + SYNTAX SEQUENCE OF UbntIfEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "" + ::= { unifiApIf 1 } + +unifiIfEntry OBJECT-TYPE + SYNTAX UbntIfEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "Ethernet interface" + INDEX { unifiIfIndex } + ::= { unifiIfTable 1 } + +UbntIfEntry ::= SEQUENCE { + unifiIfIndex ObjectIndex, + unifiIfFullDuplex TruthValue, + unifiIfIp IpAddress, + unifiIfMac MacAddress, + unifiIfName DisplayString, + unifiIfRxBytes Counter32, + unifiIfRxDropped Counter32, + unifiIfRxError Counter32, + unifiIfRxMulticast Counter32, + unifiIfRxPackets Counter32, + unifiIfSpeed Integer32, + unifiIfTxBytes Counter32, + unifiIfTxDropped Counter32, + unifiIfTxError Counter32, + unifiIfTxPackets Counter32, + unifiIfUp TruthValue +} + +unifiIfIndex OBJECT-TYPE + SYNTAX ObjectIndex + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 1 } + +unifiIfFullDuplex OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 2 } + +unifiIfIp OBJECT-TYPE + SYNTAX IpAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 3 } + +unifiIfMac OBJECT-TYPE + SYNTAX MacAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 4 } + +unifiIfName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 5 } + +unifiIfRxBytes OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 6 } + +unifiIfRxDropped OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 7 } + +unifiIfRxError OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 8 } + +unifiIfRxMulticast OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 9 } + +unifiIfRxPackets OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 10 } + +unifiIfSpeed OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 11 } + +unifiIfTxBytes OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 12 } + +unifiIfTxDropped OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 13 } + +unifiIfTxError OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 14 } + +unifiIfTxPackets OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 15 } + +unifiIfUp OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiIfEntry 16 } + +unifiRadioTable OBJECT-TYPE + SYNTAX SEQUENCE OF UbntRadioEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "" + ::= { unifiApWireless 1 } + +unifiRadioEntry OBJECT-TYPE + SYNTAX UbntRadioEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "Wireless interface" + INDEX { unifiRadioIndex } + ::= { unifiRadioTable 1 } + +UbntRadioEntry ::= SEQUENCE { + unifiRadioIndex ObjectIndex, + unifiRadioName DisplayString, + unifiRadioRadio DisplayString, + unifiRadioRxPackets Counter32, + unifiRadioTxPackets Counter32, + unifiRadioCuTotal Integer32, + unifiRadioCuSelfRx Integer32, + unifiRadioCuSelfTx Integer32, + unifiRadioOtherBss Integer32 +} + +unifiRadioIndex OBJECT-TYPE + SYNTAX ObjectIndex + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 1 } + +unifiRadioName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 2 } + +unifiRadioRadio OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 3 } + +unifiRadioRxPackets OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 4 } + +unifiRadioTxPackets OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 5 } + +unifiRadioCuTotal OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 6 } + +unifiRadioCuSelfRx OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 7 } + +unifiRadioCuSelfTx OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 8 } + +unifiRadioOtherBss OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiRadioEntry 9 } + +unifiVapTable OBJECT-TYPE + SYNTAX SEQUENCE OF UbntVapEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "" + ::= { unifiApWireless 2 } + +unifiVapEntry OBJECT-TYPE + SYNTAX UbntVapEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "BSS" + INDEX { unifiVapIndex } + ::= { unifiVapTable 1 } + +UbntVapEntry ::= SEQUENCE { + unifiVapIndex ObjectIndex, + unifiVapBssId MacAddress, + unifiVapCcq Integer32, + unifiVapChannel Integer32, + unifiVapExtChannel Integer32, + unifiVapEssId DisplayString, + unifiVapName DisplayString, + unifiVapNumStations Integer32, + unifiVapRadio DisplayString, + unifiVapRxBytes Counter32, + unifiVapRxCrypts Counter32, + unifiVapRxDropped Counter32, + unifiVapRxErrors Counter32, + unifiVapRxFrags Counter32, + unifiVapRxPackets Counter32, + unifiVapTxBytes Counter32, + unifiVapTxDropped Counter32, + unifiVapTxErrors Counter32, + unifiVapTxPackets Counter32, + unifiVapTxRetries Counter32, + unifiVapTxPower Integer32, + unifiVapUp TruthValue, + unifiVapUsage DisplayString +} + +unifiVapIndex OBJECT-TYPE + SYNTAX ObjectIndex + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 1 } + +unifiVapBssId OBJECT-TYPE + SYNTAX MacAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 2 } + +unifiVapCcq OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 3 } + +unifiVapChannel OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 4 } + +unifiVapExtChannel OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 5 } + +unifiVapEssId OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 6 } + +unifiVapName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 7 } + +unifiVapNumStations OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 8 } + +unifiVapRadio OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 9 } + +unifiVapRxBytes OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 10 } + +unifiVapRxCrypts OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 11 } + +unifiVapRxDropped OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 12 } + +unifiVapRxErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 13 } + +unifiVapRxFrags OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 14 } + +unifiVapRxPackets OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 15 } + +unifiVapTxBytes OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 16 } + +unifiVapTxDropped OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 17 } + +unifiVapTxErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 18 } + +unifiVapTxPackets OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 19 } + +unifiVapTxRetries OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 20 } + +unifiVapTxPower OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 21 } + +unifiVapUp OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiVapEntry 22 } + +unifiVapUsage OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "guest or regular user" + ::= { unifiVapEntry 23 } + +unifiApSystemIp OBJECT-TYPE + SYNTAX IpAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiApSystem 1 } + +unifiApSystemIsolated OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiApSystem 2 } + +unifiApSystemModel OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiApSystem 3 } + +unifiApSystemUplink OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiApSystem 4 } + +unifiApSystemUptime OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiApSystem 5 } + +unifiApSystemVersion OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "" + ::= { unifiApSystem 6 } + +unifiIfGroup OBJECT-GROUP OBJECTS { + unifiIfFullDuplex, + unifiIfIp, + unifiIfMac, + unifiIfName, + unifiIfRxBytes, + unifiIfRxDropped, + unifiIfRxError, + unifiIfRxMulticast, + unifiIfRxPackets, + unifiIfSpeed, + unifiIfTxBytes, + unifiIfTxDropped, + unifiIfTxError, + unifiIfTxPackets, + unifiIfUp + } + STATUS current + DESCRIPTION "" + ::= { ubntUniFiGroups 1 } + +unifiRadioGroups OBJECT-GROUP OBJECTS { + unifiRadioName, + unifiRadioRadio, + unifiRadioRxPackets, + unifiRadioTxPackets, + unifiRadioCuTotal, + unifiRadioCuSelfRx, + unifiRadioCuSelfTx, + unifiRadioOtherBss + } + STATUS current + DESCRIPTION "" + ::= { ubntUniFiGroups 2 } + +unifiVapGroups OBJECT-GROUP OBJECTS { + unifiVapBssId, + unifiVapCcq, + unifiVapChannel, + unifiVapExtChannel, + unifiVapEssId, + unifiVapName, + unifiVapNumStations, + unifiVapRadio, + unifiVapRxBytes, + unifiVapRxCrypts, + unifiVapRxDropped, + unifiVapRxErrors, + unifiVapRxFrags, + unifiVapRxPackets, + unifiVapTxBytes, + unifiVapTxDropped, + unifiVapTxErrors, + unifiVapTxPackets, + unifiVapTxRetries, + unifiVapTxPower, + unifiVapUp, + unifiVapUsage + } + STATUS current + DESCRIPTION "" + ::= { ubntUniFiGroups 3 } + +unifiApSystemGroup OBJECT-GROUP OBJECTS { + unifiApSystemIp, unifiApSystemIsolated, unifiApSystemModel, unifiApSystemUplink, unifiApSystemUptime, unifiApSystemVersion + } + STATUS current + DESCRIPTION "" + ::= { ubntUniFiGroups 4 } + +END From 10ad85374f6c2a0d55ffa5b4a02049affecf0cf6 Mon Sep 17 00:00:00 2001 From: Justin Settle Date: Mon, 17 Oct 2016 11:02:43 -0400 Subject: [PATCH 11/13] Add mib-based polling of Unifi Wifi Capacity --- .../device/ubnt_unifi_RadioCu_0.inc.php | 35 ++++++++++ .../device/ubnt_unifi_RadioCu_1.inc.php | 35 ++++++++++ includes/definitions.inc.php | 9 +++ includes/polling/mib/ubnt-unifi-mib.inc.php | 69 +++++++++++++++++++ includes/polling/wifi.inc.php | 1 + 5 files changed, 149 insertions(+) create mode 100644 html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php create mode 100644 html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php create mode 100644 includes/polling/mib/ubnt-unifi-mib.inc.php diff --git a/html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php b/html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php new file mode 100644 index 0000000000..9632cde8c7 --- /dev/null +++ b/html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php @@ -0,0 +1,35 @@ + 'Radio0OtherBss', + 'filename' => $rrd_filename, + 'descr' => 'Radio0 Others', + ), + array( + 'ds' => 'Radio0CuSelfRx', + 'filename' => $rrd_filename, + 'descr' => 'Radio0 RX', + ), + array( + 'ds' => 'Radio0CuSelfTx', + 'filename' => $rrd_filename, + 'descr' => 'Radio0 TX', + ), + ); +} else { + echo "file missing: $rrd_filename"; +} + +require 'includes/graphs/generic_multi.inc.php'; diff --git a/html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php b/html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php new file mode 100644 index 0000000000..81fa57ed8c --- /dev/null +++ b/html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php @@ -0,0 +1,35 @@ + 'Radio1OtherBss', + 'filename' => $rrd_filename, + 'descr' => 'Radio1 Others', + ), + array( + 'ds' => 'Radio1CuSelfRx', + 'filename' => $rrd_filename, + 'descr' => 'Radio1 RX', + ), + array( + 'ds' => 'Radio1CuSelfTx', + 'filename' => $rrd_filename, + 'descr' => 'Radio1 TX', + ), + ); +} else { + echo "file missing: $rrd_filename"; +} + +require 'includes/graphs/generic_multi.inc.php'; diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 8bb35d342b..81d96a9245 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -2288,6 +2288,15 @@ $config['graph_types']['device']['ubnt_airfiber_RFTotPktsRx']['section'] = 'wire $config['graph_types']['device']['ubnt_airfiber_RFTotPktsRx']['order'] = '7'; $config['graph_types']['device']['ubnt_airfiber_RFTotPktsRx']['descr'] = 'RF Total Packets Rx'; +// Unifi Support +$config['graph_types']['device']['ubnt_unifi_RadioCu_0']['section'] = 'wireless'; +$config['graph_types']['device']['ubnt_unifi_RadioCu_0']['order'] = '0'; +$config['graph_types']['device']['ubnt_unifi_RadioCu_0']['descr'] = 'Radio0 Capacity Used'; + +$config['graph_types']['device']['ubnt_unifi_RadioCu_1']['section'] = 'wireless'; +$config['graph_types']['device']['ubnt_unifi_RadioCu_1']['order'] = '1'; +$config['graph_types']['device']['ubnt_unifi_RadioCu_1']['descr'] = 'Radio1 Capacity Used'; + // Siklu support $config['graph_types']['device']['siklu_rfAverageRssi']['section'] = 'wireless'; $config['graph_types']['device']['siklu_rfAverageRssi']['order'] = '0'; diff --git a/includes/polling/mib/ubnt-unifi-mib.inc.php b/includes/polling/mib/ubnt-unifi-mib.inc.php new file mode 100644 index 0000000000..aa86e06f50 --- /dev/null +++ b/includes/polling/mib/ubnt-unifi-mib.inc.php @@ -0,0 +1,69 @@ + array( + '', + 'Radio0CuTotal', + 'Radio0 Channel Utilized', + 'GAUGE', + ), + 'unifiRadioCuTotal.1' => array( + '', + 'Radio1CuTotal', + 'Radio1 Channel Utilized', + 'GAUGE', + ), + 'unifiRadioCuSelfRx.0' => array( + '', + 'Radio0CuSelfRx', + 'Radio0 Channel Utilized Rx', + 'GAUGE', + ), + 'unifiRadioCuSelfRx.1' => array( + '', + 'Radio1CuSelfRx', + 'Radio1 Channel Utilized Rx', + 'GAUGE', + ), + 'unifiRadioCuSelfTx.0' => array( + '', + 'Radio0CuSelfTx', + 'Radio0 Channel Utilized Tx', + 'GAUGE', + ), + 'unifiRadioCuSelfTx.1' => array( + '', + 'Radio1CuSelfTx', + 'Radio1 Channel Utilized Tx', + 'GAUGE', + ), + 'unifiRadioOtherBss.0' => array( + '', + 'Radio0OtherBss', + 'Radio0 Channel Utilized by Others', + 'GAUGE', + ), + 'unifiRadioOtherBss.1' => array( + '', + 'Radio1OtherBss', + 'Radio1 Channel Utilized by Others', + 'GAUGE', + ), +); + + +$mib_graphs = array( + 'ubnt_unifi_RadioCu_0', + 'ubnt_unifi_RadioCu_1', +); + +unset($graph, $oids, $oid); + +poll_mib_def($device, 'UBNT-UniFi-MIB:UBNT', 'ubiquiti', $mib_oids, $mib_graphs, $graphs); +// EOF diff --git a/includes/polling/wifi.inc.php b/includes/polling/wifi.inc.php index 1444915828..99685f1599 100644 --- a/includes/polling/wifi.inc.php +++ b/includes/polling/wifi.inc.php @@ -77,6 +77,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall' || $device['ty } echo (($wificlients1 + 0).' clients on Radio0, '.($wificlients2 + 0)." clients on Radio1\n"); + include 'includes/polling/mib/ubnt-unifi-mib.inc.php'; } if (isset($wificlients1) && $wificlients1 != '') { From 0f809324656db8eac936a570f31212adafa316e8 Mon Sep 17 00:00:00 2001 From: j-ems Date: Mon, 17 Oct 2016 10:46:44 -0500 Subject: [PATCH 12/13] I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index f0c77e9f80..776b0c883d 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -141,6 +141,7 @@ LibreNMS contributors: - Karl Shea (karlshea) - Justin Settle (jquagga) - Alexander Kratzsch (klump) +- Joseph Eames (j-ems) [1]: http://observium.org/ "Observium web site" Observium was written by: From 9d67c90a50f99a01a760c242d37b3e5f9c2a8bec Mon Sep 17 00:00:00 2001 From: Justin Settle Date: Mon, 17 Oct 2016 12:41:20 -0400 Subject: [PATCH 13/13] Implement rrdtool_check_rrd_exists --- html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php | 2 +- html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php b/html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php index 9632cde8c7..3d0e24674e 100644 --- a/html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php +++ b/html/includes/graphs/device/ubnt_unifi_RadioCu_0.inc.php @@ -10,7 +10,7 @@ $rigid = true; $print_total = true; $simple_rrd = true; -if (is_file($rrd_filename)) { +if (rrdtool_check_rrd_exists($rrd_filename)) { $rrd_list = array( array( 'ds' => 'Radio0OtherBss', diff --git a/html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php b/html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php index 81fa57ed8c..58532bc12f 100644 --- a/html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php +++ b/html/includes/graphs/device/ubnt_unifi_RadioCu_1.inc.php @@ -10,7 +10,7 @@ $rigid = true; $print_total = true; $simple_rrd = true; -if (is_file($rrd_filename)) { +if (rrdtool_check_rrd_exists($rrd_filename)) { $rrd_list = array( array( 'ds' => 'Radio1OtherBss',