Ubiquiti Edgepower battery values (#12247)

* UBNT-EdgeMAX mib update

* Ubiquiti Edgepower new SNMP values

* Fix typo

* Guess test data

* Update edgeos-ep.json

* more favorable rounding

* Update edgeos-ep.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Wheel
2020-11-09 01:51:22 -05:00
committed by GitHub
parent b7676e4cc8
commit 475c079402
4 changed files with 242 additions and 14 deletions

View File

@@ -33,6 +33,21 @@ modules:
num_oid: '.1.3.6.1.4.1.41112.1.5.3.2.1.5.{{ $index }}'
index: 'ubntPsuVoltage.{{ $index }}'
descr: 'Input Voltage PSU {{ $index }}'
charge:
data:
-
oid: ubntPsuBatteryChargeLevel
num_oid: '.1.3.6.1.4.1.41112.1.5.3.2.1.9.{{ $index }}'
index: 'ubntPsuBatteryChargeLevel.{{ $index }}'
descr: 'Charge percentage PSU {{ $index }}'
runtime:
data:
-
oid: ubntPsuBatteryTimeRemaining
divisor: 6000
num_oid: '.1.3.6.1.4.1.41112.1.5.3.2.1.10.{{ $index }}'
index: 'ubntPsuBatteryTimeRemaining.{{ $index }}'
descr: 'Battery runtime remaining PSU {{ $index }}'
current:
data:
-
@@ -89,6 +104,16 @@ modules:
- { descr: AC, graph: 0, value: 1, generic: 0 }
- { descr: DC, graph: 0, value: 2, generic: 0 }
- { descr: POE, graph: 0, value: 3, generic: 0 }
-
oid: ubntPsuBatteryReplaceIndicator
value: ubntPsuBatteryReplaceIndicator
num_oid: '.1.3.6.1.4.1.41112.1.5.3.2.1.11.{{ $index }}'
descr: 'Battery indicator PSU {{ $index }}'
index: '{{ $index }}'
states:
- { descr: unknown, graph: 0, value: 0, generic: 1 }
- { descr: OK, graph: 0, value: 1, generic: 0 }
- { descr: REPLACE, graph: 0, value: 2, generic: 1 }
temperature:
data:
-

View File

@@ -135,13 +135,17 @@ UBNT-EdgeMAX-MIB DEFINITIONS ::= BEGIN
UbntPsuEntry ::= SEQUENCE {
ubntPsuIndex Integer32,
ubntPsuType Integer32,
ubntPsuStatus Integer32,
ubntPsuOperStatus Integer32,
ubntPsuType INTEGER,
ubntPsuStatus INTEGER,
ubntPsuOperStatus INTEGER,
ubntPsuVoltage Integer32,
ubntPsuTemperature Integer32,
ubntPsuCharging Integer32,
ubntPsuBatteryQuantity Integer32
ubntPsuCharging INTEGER,
ubntPsuBatteryQuantity Integer32,
ubntPsuBatteryChargeLevel INTEGER,
ubntPsuBatteryTimeRemaining TimeTicks,
ubntPsuBatteryReplaceIndicator INTEGER,
ubntPsuBatteryLastReplaceDate DisplayString
}
ubntPsuIndex OBJECT-TYPE
@@ -200,6 +204,34 @@ UBNT-EdgeMAX-MIB DEFINITIONS ::= BEGIN
DESCRIPTION "Number of batteries connected to PSU."
::= { ubntPsuEntry 8 }
ubntPsuBatteryChargeLevel OBJECT-TYPE
SYNTAX INTEGER (0..100)
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Current battery charge level as a percent (0-100%)."
::= { ubntPsuEntry 9 }
ubntPsuBatteryTimeRemaining OBJECT-TYPE
SYNTAX TimeTicks
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The battery run time remaining before battery exhaustion."
::= { ubntPsuEntry 10 }
ubntPsuBatteryReplaceIndicator OBJECT-TYPE
SYNTAX INTEGER { unknown(0), noBatteryNeedsReplacing(1), batteryNeedsReplacing(2) }
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Indicates whether the batteries need replacing."
::= { ubntPsuEntry 11 }
ubntPsuBatteryLastReplaceDate OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Battery installation date (mm/dd/yyyy)."
::= { ubntPsuEntry 12 }
-- --------------------------------------------------------------------------------
-- thermometers
-- --------------------------------------------------------------------------------

View File

@@ -692,6 +692,54 @@
"sensors": {
"discovery": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "charge",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.41112.1.5.3.2.1.9.1",
"sensor_index": "ubntPsuBatteryChargeLevel.1",
"sensor_type": "edgeos-ep",
"sensor_descr": "Charge percentage PSU 1",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "charge",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.41112.1.5.3.2.1.9.2",
"sensor_index": "ubntPsuBatteryChargeLevel.2",
"sensor_type": "edgeos-ep",
"sensor_descr": "Charge percentage PSU 2",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "count",
@@ -812,6 +860,102 @@
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "runtime",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.41112.1.5.3.2.1.10.1",
"sensor_index": "ubntPsuBatteryTimeRemaining.1",
"sensor_type": "edgeos-ep",
"sensor_descr": "Battery runtime remaining PSU 1",
"group": null,
"sensor_divisor": 6000,
"sensor_multiplier": 1,
"sensor_current": 2,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "runtime",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.41112.1.5.3.2.1.10.2",
"sensor_index": "ubntPsuBatteryTimeRemaining.2",
"sensor_type": "edgeos-ep",
"sensor_descr": "Battery runtime remaining PSU 2",
"group": null,
"sensor_divisor": 6000,
"sensor_multiplier": 1,
"sensor_current": 2,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.41112.1.5.3.2.1.11.1",
"sensor_index": "1",
"sensor_type": "ubntPsuBatteryReplaceIndicator",
"sensor_descr": "Battery indicator PSU 1",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "ubntPsuBatteryReplaceIndicator"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.41112.1.5.3.2.1.11.2",
"sensor_index": "2",
"sensor_type": "ubntPsuBatteryReplaceIndicator",
"sensor_descr": "Battery indicator PSU 2",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "ubntPsuBatteryReplaceIndicator"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
@@ -1174,6 +1318,27 @@
}
],
"state_indexes": [
{
"state_name": "ubntPsuBatteryReplaceIndicator",
"state_descr": "unknown",
"state_draw_graph": 0,
"state_value": 0,
"state_generic_value": 1
},
{
"state_name": "ubntPsuBatteryReplaceIndicator",
"state_descr": "OK",
"state_draw_graph": 0,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "ubntPsuBatteryReplaceIndicator",
"state_descr": "REPLACE",
"state_draw_graph": 0,
"state_value": 2,
"state_generic_value": 1
},
{
"state_name": "ubntPsuCharging",
"state_descr": "unknown",

View File

@@ -119,6 +119,12 @@
1.3.6.1.4.1.41112.1.5.3.2.1.7.2|2|1
1.3.6.1.4.1.41112.1.5.3.2.1.8.1|2|0
1.3.6.1.4.1.41112.1.5.3.2.1.8.2|2|3
1.3.6.1.4.1.41112.1.5.3.2.1.9.1|2|0
1.3.6.1.4.1.41112.1.5.3.2.1.9.2|2|0
1.3.6.1.4.1.41112.1.5.3.2.1.10.1|67|12000
1.3.6.1.4.1.41112.1.5.3.2.1.10.2|67|12000
1.3.6.1.4.1.41112.1.5.3.2.1.11.1|2|0
1.3.6.1.4.1.41112.1.5.3.2.1.11.2|2|0
1.3.6.1.4.1.41112.1.5.4.2.1.3.1|2|18500
1.3.6.1.4.1.41112.1.5.4.2.1.3.2|2|25500
1.3.6.1.4.1.41112.1.5.4.2.1.3.3|2|23500