powewalker improvements/fixes + test-data (#15999)

This commit is contained in:
Nicolas
2024-05-01 11:23:37 +02:00
committed by GitHub
parent 58883278cf
commit 8efa3370f7
3 changed files with 501 additions and 1 deletions

View File

@@ -1,7 +1,14 @@
mib: EPPC-MIB mib: EPPC-MIB
modules: modules:
os:
version:
- EPPC-MIB::upsEIdentityUPSFirmwareVerison.0
- EPPC-MIB::upsEIdentityAgentSoftwareVerison.0
version_template: 'FW: {{ EPPC-MIB::upsEIdentityUPSFirmwareVerison.0 }}, NMC: {{ EPPC-MIB::upsEIdentityAgentSoftwareVerison.0 }}'
sensors: sensors:
runtime: runtime:
options:
skip_value_lt: 0
data: data:
- -
oid: upsEBatteryEstimatedMinutesRemaining oid: upsEBatteryEstimatedMinutesRemaining
@@ -11,6 +18,7 @@ modules:
voltage: voltage:
options: options:
divisor: 10 divisor: 10
skip_value_lt: 0
data: data:
- -
oid: upsEPositiveBatteryVoltage oid: upsEPositiveBatteryVoltage
@@ -96,10 +104,11 @@ modules:
temperature: temperature:
options: options:
divisor: 10 divisor: 10
skip_value_lt: 0
data: data:
- -
oid: upsESystemTemperature oid: upsESystemTemperature
num_oid: '.1.3.6.1.4.1.935.10.1.1.3.4.{{ $index }}' num_oid: '.1.3.6.1.4.1.935.10.1.1.2.2.{{ $index }}'
index: 'upsESystemTemperature.{{ $index }}' index: 'upsESystemTemperature.{{ $index }}'
descr: Ambient Temperature descr: Ambient Temperature
- -
@@ -205,6 +214,25 @@ modules:
descr: System Output Load descr: System Output Load
state: state:
data: data:
-
oid: upsESystemStatus
num_oid: '.1.3.6.1.4.1.935.10.1.1.2.1.0'
descr: System Status
state_name: upsESystemStatus
states:
- { value: 1, generic: 0, graph: 1, descr: 'power-on' }
- { value: 2, generic: 0, graph: 1, descr: 'stand-by' }
- { value: 3, generic: 0, graph: 1, descr: 'by-pass' }
- { value: 4, generic: 0, graph: 1, descr: 'line' }
- { value: 5, generic: 2, graph: 1, descr: 'battery' }
- { value: 6, generic: 1, graph: 1, descr: 'battery-test' }
- { value: 7, generic: 2, graph: 1, descr: 'fault' }
- { value: 8, generic: 0, graph: 1, descr: 'converter' }
- { value: 9, generic: 0, graph: 1, descr: 'eco' }
- { value: 10, generic: 1, graph: 1, descr: 'shutdown' }
- { value: 11, generic: 0, graph: 1, descr: 'on-boosters' }
- { value: 12, generic: 0, graph: 1, descr: 'on-reducer' }
- { value: 13, generic: 3, graph: 1, descr: 'other' }
- -
oid: upsEBatteryStatus oid: upsEBatteryStatus
num_oid: '.1.3.6.1.4.1.935.10.1.1.3.1.{{ $index }}' num_oid: '.1.3.6.1.4.1.935.10.1.1.3.1.{{ $index }}'

440
tests/data/powerwalker.json Normal file
View File

@@ -0,0 +1,440 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": null,
"sysObjectID": ".1.3.6.1.4.1.935.10.1",
"sysDescr": "Network Management Card for UPS",
"sysContact": null,
"version": "FW: 05616-0600, NMC: 3.1.0.0",
"hardware": null,
"features": null,
"location": null,
"os": "powerwalker",
"type": "power",
"serial": null,
"icon": "powerwalker.png"
}
]
},
"poller": "matches discovery"
},
"sensors": {
"discovery": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "charge",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.3.4.0",
"sensor_index": "upsEBatteryEstimatedChargeRemaining.0",
"sensor_type": "powerwalker",
"sensor_descr": "Battery charge remaining",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 100,
"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,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.2.16.1.2.1",
"sensor_index": "upsESystemInputFrequency.1",
"sensor_type": "powerwalker",
"sensor_descr": "System Input",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 49.9,
"sensor_limit": 52.395,
"sensor_limit_warn": null,
"sensor_limit_low": 47.405,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "frequency",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.2.18.1.2.1",
"sensor_index": "upsESystemOutputFrequency.1",
"sensor_type": "powerwalker",
"sensor_descr": "System Output",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 49.9,
"sensor_limit": 52.395,
"sensor_limit_warn": null,
"sensor_limit_low": 47.405,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "load",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.2.18.1.7.1",
"sensor_index": "upsESystemOutputLoad.1",
"sensor_type": "powerwalker",
"sensor_descr": "System Output Load",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 27,
"sensor_limit": 80,
"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,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "runtime",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.3.3.0",
"sensor_index": "upsEBatteryEstimatedMinutesRemaining.0",
"sensor_type": "powerwalker",
"sensor_descr": "Battery time remaining",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 600,
"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,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.3.1.0",
"sensor_index": "upsEBatteryStatus.0",
"sensor_type": "upsEBatteryStatus",
"sensor_descr": "Battery Status",
"group": null,
"sensor_divisor": 1,
"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,
"rrd_type": "GAUGE",
"state_name": "upsEBatteryStatus"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.2.1.0",
"sensor_index": "0",
"sensor_type": "upsESystemStatus",
"sensor_descr": "System Status",
"group": null,
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 4,
"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,
"rrd_type": "GAUGE",
"state_name": "upsESystemStatus"
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.2.2.0",
"sensor_index": "upsESystemTemperature.0",
"sensor_type": "powerwalker",
"sensor_descr": "Ambient Temperature",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 30.8,
"sensor_limit": 50.8,
"sensor_limit_warn": null,
"sensor_limit_low": 20.8,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.3.5.0",
"sensor_index": "upsEPositiveBatteryVoltage.0",
"sensor_type": "powerwalker",
"sensor_descr": "Postitive Battery Voltage",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 108.9,
"sensor_limit": 125.235,
"sensor_limit_warn": null,
"sensor_limit_low": 92.565,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.2.16.1.3.1",
"sensor_index": "upsESystemInputVoltage.1",
"sensor_type": "powerwalker",
"sensor_descr": "Input",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 238.2,
"sensor_limit": 273.93,
"sensor_limit_warn": null,
"sensor_limit_low": 202.47,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.935.10.1.1.2.18.1.3.1",
"sensor_index": "upsESystemOutputVoltage.1",
"sensor_type": "powerwalker",
"sensor_descr": "Output",
"group": null,
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 230,
"sensor_limit": 264.5,
"sensor_limit_warn": null,
"sensor_limit_low": 195.5,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"rrd_type": "GAUGE",
"state_name": null
}
],
"state_indexes": [
{
"state_name": "upsEBatteryStatus",
"state_descr": "unknown",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 3
},
{
"state_name": "upsEBatteryStatus",
"state_descr": "batteryNormal",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "upsEBatteryStatus",
"state_descr": "batteryLow",
"state_draw_graph": 1,
"state_value": 3,
"state_generic_value": 1
},
{
"state_name": "upsEBatteryStatus",
"state_descr": "batteryDepleted",
"state_draw_graph": 1,
"state_value": 4,
"state_generic_value": 2
},
{
"state_name": "upsEBatteryStatus",
"state_descr": "batteryDischarging",
"state_draw_graph": 1,
"state_value": 5,
"state_generic_value": 1
},
{
"state_name": "upsEBatteryStatus",
"state_descr": "batteryFailure",
"state_draw_graph": 1,
"state_value": 6,
"state_generic_value": 2
},
{
"state_name": "upsESystemStatus",
"state_descr": "power-on",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "stand-by",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "by-pass",
"state_draw_graph": 1,
"state_value": 3,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "line",
"state_draw_graph": 1,
"state_value": 4,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "battery",
"state_draw_graph": 1,
"state_value": 5,
"state_generic_value": 2
},
{
"state_name": "upsESystemStatus",
"state_descr": "battery-test",
"state_draw_graph": 1,
"state_value": 6,
"state_generic_value": 1
},
{
"state_name": "upsESystemStatus",
"state_descr": "fault",
"state_draw_graph": 1,
"state_value": 7,
"state_generic_value": 2
},
{
"state_name": "upsESystemStatus",
"state_descr": "converter",
"state_draw_graph": 1,
"state_value": 8,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "eco",
"state_draw_graph": 1,
"state_value": 9,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "shutdown",
"state_draw_graph": 1,
"state_value": 10,
"state_generic_value": 1
},
{
"state_name": "upsESystemStatus",
"state_descr": "on-boosters",
"state_draw_graph": 1,
"state_value": 11,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "on-reducer",
"state_draw_graph": 1,
"state_value": 12,
"state_generic_value": 0
},
{
"state_name": "upsESystemStatus",
"state_descr": "other",
"state_draw_graph": 1,
"state_value": 13,
"state_generic_value": 3
}
]
},
"poller": "matches discovery"
}
}

View File

@@ -1,2 +1,34 @@
1.3.6.1.2.1.1.1.0|4|Network Management Card for UPS 1.3.6.1.2.1.1.1.0|4|Network Management Card for UPS
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.935.10.1 1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.935.10.1
1.3.6.1.4.1.935.10.1.1.1.3.0|4|05616-0600
1.3.6.1.4.1.935.10.1.1.1.6.0|4|3.1.0.0
1.3.6.1.4.1.935.10.1.1.2.1.0|2|4
1.3.6.1.4.1.935.10.1.1.2.2.0|2|308
1.3.6.1.4.1.935.10.1.1.2.16.1.2.1|2|499
1.3.6.1.4.1.935.10.1.1.2.16.1.3.1|2|2382
1.3.6.1.4.1.935.10.1.1.2.16.1.4.1|2|-1
1.3.6.1.4.1.935.10.1.1.2.16.1.5.1|2|-1
1.3.6.1.4.1.935.10.1.1.2.18.1.2.1|2|499
1.3.6.1.4.1.935.10.1.1.2.18.1.3.1|2|2300
1.3.6.1.4.1.935.10.1.1.2.18.1.4.1|2|-1
1.3.6.1.4.1.935.10.1.1.2.18.1.5.1|2|-1
1.3.6.1.4.1.935.10.1.1.2.18.1.6.1|2|-1
1.3.6.1.4.1.935.10.1.1.2.18.1.7.1|2|27
1.3.6.1.4.1.935.10.1.1.3.1.0|2|2
1.3.6.1.4.1.935.10.1.1.3.3.0|2|600
1.3.6.1.4.1.935.10.1.1.3.4.0|2|100
1.3.6.1.4.1.935.10.1.1.3.5.0|2|1089
1.3.6.1.4.1.935.10.1.1.3.6.0|2|-1
1.3.6.1.4.1.935.10.1.1.3.8.0|2|-1
1.3.6.1.4.1.935.10.1.1.6.1.1.0|2|-1
1.3.6.1.4.1.935.10.1.1.6.1.2.0|2|500
1.3.6.1.4.1.935.10.1.1.6.1.3.0|2|2
1.3.6.1.4.1.935.10.1.1.6.1.4.0|2|150
1.3.6.1.4.1.935.10.1.1.6.1.5.0|2|2
1.3.6.1.4.1.935.10.1.1.6.1.6.0|2|0
1.3.6.1.4.1.935.10.1.1.6.2.1.0|2|-1
1.3.6.1.4.1.935.10.1.1.6.2.2.0|2|90
1.3.6.1.4.1.935.10.1.1.6.2.3.0|2|2
1.3.6.1.4.1.935.10.1.1.6.2.4.0|2|50
1.3.6.1.4.1.935.10.1.1.6.2.5.0|2|2
1.3.6.1.4.1.935.10.1.1.6.2.6.0|2|0