diff --git a/includes/definitions/discovery/routeros.yaml b/includes/definitions/discovery/routeros.yaml index a5cc3b4896..cf768e6372 100644 --- a/includes/definitions/discovery/routeros.yaml +++ b/includes/definitions/discovery/routeros.yaml @@ -150,6 +150,18 @@ modules: - { descr: no, graph: 1, value: 0, generic: 0 } - { descr: yes, graph: 1, value: 1, generic: 2 } - { descr: 'null', graph: 1, value: 2, generic: 3 } + - + oid: mtxrPOETable + value: mtxrPOEStatus + num_oid: '.1.3.6.1.4.1.14988.1.1.15.1.1.3.{{ $index }}' + descr: '{{ $mtxrPOEName }} POE' + index: 'mtxrPOEStatus.{{ $index }}' + state_name: mtxrPOEStatus + states: + - { descr: 'disabled', graph: 1, value: 1, generic: 3 } + - { descr: 'waitingForLoad', graph: 1, value: 2, generic: 3 } + - { descr: 'poweredOn', graph: 1, value: 3, generic: 0 } + - { descr: 'overload', graph: 1, value: 4, generic: 2 } - oid: mtxrHlPowerSupplyState num_oid: '.1.3.6.1.4.1.14988.1.1.3.15.{{ $index }}' diff --git a/tests/data/routeros.json b/tests/data/routeros.json index 3fbe494d25..df66800d3d 100644 --- a/tests/data/routeros.json +++ b/tests/data/routeros.json @@ -2464,8 +2464,8 @@ "group": "", "sensor_divisor": 1000, "sensor_multiplier": 1, - "sensor_current": 0.0070000000000000001, - "sensor_limit": 0.010500000000000001, + "sensor_current": 0.007, + "sensor_limit": 0.0105, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, @@ -2513,9 +2513,9 @@ "sensor_divisor": 1000, "sensor_multiplier": 1, "sensor_current": -5.673, - "sensor_limit": -5.3893500000000003, + "sensor_limit": -5.38935, "sensor_limit_warn": null, - "sensor_limit_low": -5.9566499999999998, + "sensor_limit_low": -5.95665, "sensor_limit_low_warn": null, "sensor_alert": 1, "sensor_custom": "No", @@ -2536,10 +2536,10 @@ "group": "", "sensor_divisor": 1000, "sensor_multiplier": 1, - "sensor_current": -4.8789999999999996, - "sensor_limit": -4.6350499999999997, + "sensor_current": -4.879, + "sensor_limit": -4.63505, "sensor_limit_warn": null, - "sensor_limit_low": -5.1229500000000003, + "sensor_limit_low": -5.12295, "sensor_limit_low_warn": null, "sensor_alert": 1, "sensor_custom": "No", @@ -2621,6 +2621,30 @@ "user_func": null, "state_name": "mtxrOpticalTxFault" }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.14988.1.1.15.1.1.3.7", + "sensor_index": "mtxrPOEStatus.7", + "sensor_type": "mtxrPOEStatus", + "sensor_descr": "ether5 POE", + "group": "", + "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, + "state_name": "mtxrPOEStatus" + }, { "sensor_deleted": 0, "sensor_class": "state", @@ -2729,7 +2753,7 @@ "sensor_divisor": 10, "sensor_multiplier": 1, "sensor_current": 15.4, - "sensor_limit": 17.710000000000001, + "sensor_limit": 17.71, "sensor_limit_warn": null, "sensor_limit_low": 13.09, "sensor_limit_low_warn": null, @@ -2753,9 +2777,9 @@ "sensor_divisor": 1000, "sensor_multiplier": 1, "sensor_current": 3.302, - "sensor_limit": 3.7972999999999999, + "sensor_limit": 3.7973, "sensor_limit_warn": null, - "sensor_limit_low": 2.8067000000000002, + "sensor_limit_low": 2.8067, "sensor_limit_low_warn": null, "sensor_alert": 1, "sensor_custom": "No", @@ -2833,6 +2857,34 @@ "state_value": 2, "state_generic_value": 3 }, + { + "state_name": "mtxrPOEStatus", + "state_descr": "disabled", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 3 + }, + { + "state_name": "mtxrPOEStatus", + "state_descr": "waitingForLoad", + "state_draw_graph": 1, + "state_value": 2, + "state_generic_value": 3 + }, + { + "state_name": "mtxrPOEStatus", + "state_descr": "poweredOn", + "state_draw_graph": 1, + "state_value": 3, + "state_generic_value": 0 + }, + { + "state_name": "mtxrPOEStatus", + "state_descr": "overload", + "state_draw_graph": 1, + "state_value": 4, + "state_generic_value": 2 + }, { "state_name": "mtxrWl60GConnected", "state_descr": "disconnected", @@ -3389,7 +3441,7 @@ "sensor_divisor": 100000, "sensor_multiplier": 0, "sensor_aggregator": "sum", - "sensor_current": 0.023099999999999999, + "sensor_current": 0.0231, "sensor_prev": null, "sensor_limit": null, "sensor_limit_warn": null, @@ -3876,8 +3928,8 @@ "sensor_divisor": 100000, "sensor_multiplier": 0, "sensor_aggregator": "sum", - "sensor_current": 0.023099999999999999, - "sensor_prev": 0.023099999999999999, + "sensor_current": 0.0231, + "sensor_prev": 0.0231, "sensor_limit": null, "sensor_limit_warn": null, "sensor_limit_low": null,