Skip to content

Commit 89e7d9c

Browse files
authored
Added additional voltage sensor for RouterOS (librenms#16979)
1 parent a5a6f36 commit 89e7d9c

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

includes/definitions/discovery/routeros.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ modules:
6565
- oid: MIKROTIK-MIB::mtxrGaugeUnit
6666
op: '!='
6767
value: 3
68+
-
69+
oid: MIKROTIK-MIB::mtxrHlVoltage
70+
num_oid: '.1.3.6.1.4.1.14988.1.1.3.8.{{ $index }}'
71+
divisor: 10
72+
descr: 'Voltage {{ $index }}'
6873
current:
6974
data:
7075
-

tests/data/routeros.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,6 +2611,31 @@
26112611
"rrd_type": "GAUGE",
26122612
"state_name": null
26132613
},
2614+
{
2615+
"sensor_deleted": 0,
2616+
"sensor_class": "voltage",
2617+
"poller_type": "snmp",
2618+
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.3.8.0",
2619+
"sensor_index": "0",
2620+
"sensor_type": "routeros",
2621+
"sensor_descr": "Voltage 0",
2622+
"group": null,
2623+
"sensor_divisor": 10,
2624+
"sensor_multiplier": 1,
2625+
"sensor_current": 15.4,
2626+
"sensor_limit": 17.71,
2627+
"sensor_limit_warn": null,
2628+
"sensor_limit_low": 13.09,
2629+
"sensor_limit_low_warn": null,
2630+
"sensor_alert": 1,
2631+
"sensor_custom": "No",
2632+
"entPhysicalIndex": null,
2633+
"entPhysicalIndex_measured": null,
2634+
"sensor_prev": null,
2635+
"user_func": null,
2636+
"rrd_type": "GAUGE",
2637+
"state_name": null
2638+
},
26142639
{
26152640
"sensor_deleted": 0,
26162641
"sensor_class": "voltage",

tests/data/routeros_rb750gr3.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,31 @@
15331533
"user_func": null,
15341534
"rrd_type": "GAUGE",
15351535
"state_name": null
1536+
},
1537+
{
1538+
"sensor_deleted": 0,
1539+
"sensor_class": "voltage",
1540+
"poller_type": "snmp",
1541+
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.3.8.0",
1542+
"sensor_index": "0",
1543+
"sensor_type": "routeros",
1544+
"sensor_descr": "Voltage 0",
1545+
"group": null,
1546+
"sensor_divisor": 10,
1547+
"sensor_multiplier": 1,
1548+
"sensor_current": 24.2,
1549+
"sensor_limit": 27.83,
1550+
"sensor_limit_warn": null,
1551+
"sensor_limit_low": 20.57,
1552+
"sensor_limit_low_warn": null,
1553+
"sensor_alert": 1,
1554+
"sensor_custom": "No",
1555+
"entPhysicalIndex": null,
1556+
"entPhysicalIndex_measured": null,
1557+
"sensor_prev": null,
1558+
"user_func": null,
1559+
"rrd_type": "GAUGE",
1560+
"state_name": null
15361561
}
15371562
]
15381563
},

tests/data/routeros_rb760igs.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,6 +2465,31 @@
24652465
"rrd_type": "GAUGE",
24662466
"state_name": null
24672467
},
2468+
{
2469+
"sensor_deleted": 0,
2470+
"sensor_class": "voltage",
2471+
"poller_type": "snmp",
2472+
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.3.8.0",
2473+
"sensor_index": "0",
2474+
"sensor_type": "routeros",
2475+
"sensor_descr": "Voltage 0",
2476+
"group": null,
2477+
"sensor_divisor": 10,
2478+
"sensor_multiplier": 1,
2479+
"sensor_current": 10.9,
2480+
"sensor_limit": 12.535,
2481+
"sensor_limit_warn": null,
2482+
"sensor_limit_low": 9.265,
2483+
"sensor_limit_low_warn": null,
2484+
"sensor_alert": 1,
2485+
"sensor_custom": "No",
2486+
"entPhysicalIndex": null,
2487+
"entPhysicalIndex_measured": null,
2488+
"sensor_prev": null,
2489+
"user_func": null,
2490+
"rrd_type": "GAUGE",
2491+
"state_name": null
2492+
},
24682493
{
24692494
"sensor_deleted": 0,
24702495
"sensor_class": "voltage",

0 commit comments

Comments
 (0)