From 64c0d6ff7f2781b6923287d491e2892d9db1fd93 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 2 Sep 2024 21:44:29 -0500 Subject: [PATCH] Ignore entity-sensor invalid values (#16347) --- LibreNMS/Util/Number.php | 2 +- .../discovery/sensors/entity-sensor.inc.php | 5 + tests/data/arista_eos.json | 725 ------------------ tests/data/arista_eos_vrf.json | 50 -- 4 files changed, 6 insertions(+), 776 deletions(-) diff --git a/LibreNMS/Util/Number.php b/LibreNMS/Util/Number.php index dbc7c89cd1..756d0fc32d 100644 --- a/LibreNMS/Util/Number.php +++ b/LibreNMS/Util/Number.php @@ -169,7 +169,7 @@ class Number if ($value > $maxSignedValue) { $signedValue = $value - $maxSignedValue * 2 - 2; - // if conversion was successfull, the number will still be in the valid range + // if conversion was successful, the number will still be in the valid range if ($signedValue > $maxSignedValue) { throw new \InvalidArgumentException('Unsigned value exceeds the maximum representable value of ' . $integerSize->name); } diff --git a/includes/discovery/sensors/entity-sensor.inc.php b/includes/discovery/sensors/entity-sensor.inc.php index 2ed74229e1..3667f1d6cd 100644 --- a/includes/discovery/sensors/entity-sensor.inc.php +++ b/includes/discovery/sensors/entity-sensor.inc.php @@ -185,6 +185,11 @@ if (! empty($entity_oids)) { if (isset($entry['entPhySensorOperStatus']) && ($entry['entPhySensorOperStatus'] === 'unavailable' || $entry['entPhySensorOperStatus'] === 'nonoperational')) { $valid_sensor = false; } + + if ($entry['entPhySensorValue'] == '-1000000000') { + $valid_sensor = false; + } + if ($valid_sensor && dbFetchCell("SELECT COUNT(*) FROM `sensors` WHERE device_id = ? AND `sensor_class` = ? AND `sensor_type` = 'cisco-entity-sensor' AND `sensor_index` = ?", [$device['device_id'], $type, $index]) == '0') { // Check to make sure we've not already seen this sensor via cisco's entity sensor mib if ($type == 'power' && $device['os'] == 'arista_eos' && preg_match('/DOM (R|T)x Power/i', $descr)) { diff --git a/tests/data/arista_eos.json b/tests/data/arista_eos.json index 8861646c5b..eceb39b8ae 100644 --- a/tests/data/arista_eos.json +++ b/tests/data/arista_eos.json @@ -1073,31 +1073,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100302213", - "sensor_index": "100302213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet2", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100302213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1123,31 +1098,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100303213", - "sensor_index": "100303213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet3", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100303213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1173,31 +1123,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100304213", - "sensor_index": "100304213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet4", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100304213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1223,31 +1148,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100305213", - "sensor_index": "100305213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet5", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100305213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1273,31 +1173,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100306213", - "sensor_index": "100306213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet6", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100306213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1323,31 +1198,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100307213", - "sensor_index": "100307213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet7", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100307213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1373,31 +1223,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100308213", - "sensor_index": "100308213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet8", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100308213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1423,31 +1248,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100309213", - "sensor_index": "100309213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet9", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100309213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1473,31 +1273,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100310213", - "sensor_index": "100310213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet10", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100310213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1523,31 +1298,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100311213", - "sensor_index": "100311213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet11", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100311213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1573,31 +1323,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100312213", - "sensor_index": "100312213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet12", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100312213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1623,31 +1348,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100313213", - "sensor_index": "100313213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet13", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100313213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1673,31 +1373,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100314213", - "sensor_index": "100314213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet14", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100314213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1723,31 +1398,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100315213", - "sensor_index": "100315213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet15", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100315213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1773,31 +1423,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100316213", - "sensor_index": "100316213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet16", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100316213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1823,31 +1448,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100317213", - "sensor_index": "100317213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet17", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100317213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1873,31 +1473,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100318213", - "sensor_index": "100318213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet18", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100318213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1923,31 +1498,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100319213", - "sensor_index": "100319213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet19", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100319213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -1973,31 +1523,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100320213", - "sensor_index": "100320213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet20", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -29.21, - "sensor_limit_low_warn": -27.21, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100320213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2023,31 +1548,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100321213", - "sensor_index": "100321213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet21", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100321213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2073,31 +1573,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100322213", - "sensor_index": "100322213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet22", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100322213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2123,31 +1598,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100323213", - "sensor_index": "100323213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet23", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100323213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2173,31 +1623,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100324213", - "sensor_index": "100324213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet24", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100324213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2223,31 +1648,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100325213", - "sensor_index": "100325213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet25", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100325213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2273,31 +1673,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100326213", - "sensor_index": "100326213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet26", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100326213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2323,31 +1698,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100327213", - "sensor_index": "100327213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet27", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100327213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2373,31 +1723,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100328213", - "sensor_index": "100328213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet28", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100328213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2423,31 +1748,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100329213", - "sensor_index": "100329213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet29", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100329213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -2473,31 +1773,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100330213", - "sensor_index": "100330213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet30", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": 1, - "sensor_limit_warn": -1, - "sensor_limit_low": -27.96, - "sensor_limit_low_warn": -26.02, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100330213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", diff --git a/tests/data/arista_eos_vrf.json b/tests/data/arista_eos_vrf.json index b71f7258b1..5e27939d22 100644 --- a/tests/data/arista_eos_vrf.json +++ b/tests/data/arista_eos_vrf.json @@ -6195,31 +6195,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100321213", - "sensor_index": "100321213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet21", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": -3, - "sensor_limit_warn": -4, - "sensor_limit_low": -22.01, - "sensor_limit_low_warn": -20.97, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100321213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "dbm", @@ -6245,31 +6220,6 @@ "rrd_type": "GAUGE", "state_name": null }, - { - "sensor_deleted": 0, - "sensor_class": "dbm", - "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.2.1.99.1.1.1.4.100322213", - "sensor_index": "100322213", - "sensor_type": "entity-sensor", - "sensor_descr": "DOM RX Power for Ethernet22", - "group": "SFPs", - "sensor_divisor": 1, - "sensor_multiplier": 1, - "sensor_current": 0, - "sensor_limit": -3, - "sensor_limit_warn": -4, - "sensor_limit_low": -22.01, - "sensor_limit_low_warn": -20.97, - "sensor_alert": 1, - "sensor_custom": "No", - "entPhysicalIndex": "100322213", - "entPhysicalIndex_measured": null, - "sensor_prev": null, - "user_func": null, - "rrd_type": "GAUGE", - "state_name": null - }, { "sensor_deleted": 0, "sensor_class": "fanspeed",