diff --git a/includes/discovery/sensors/power/smartax.inc.php b/includes/discovery/sensors/power/smartax.inc.php index 9ace90abf1f6..dfa86baca084 100644 --- a/includes/discovery/sensors/power/smartax.inc.php +++ b/includes/discovery/sensors/power/smartax.inc.php @@ -22,13 +22,13 @@ * @copyright 2018 TheGreatDoc * @author TheGreatDoc */ -$pow_frame_oid = '1.3.6.1.4.1.2011.2.6.7.1.1.1.1.11'; + $power_frame_oid = '.1.3.6.1.4.1.2011.2.6.7.1.1.1.1.11.0'; $power = snmp_get($device, $power_frame_oid, '-Ovq'); $index = '0'; -discover_sensor($valid['sensor'], 'power', $device, $power_frame_oid, $index, 'smartax', 'Chassis Total', '1', '1', null, null, null, null, $power); +discover_sensor($valid['sensor'], 'power', $device, $power_frame_oid, $index, 'smartax-total', 'Chassis Total', '1', '1', null, null, null, null, $power); $power_oid = '1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0'; $descr_oid = '1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0'; diff --git a/tests/data/smartax.json b/tests/data/smartax.json index 6a28142a5dc8..0deb246cceb9 100644 --- a/tests/data/smartax.json +++ b/tests/data/smartax.json @@ -8,7 +8,7 @@ "sysDescr": "Huawei Integrated Access Software", "sysContact": null, "version": null, - "hardware": "", + "hardware": null, "features": null, "location": null, "os": "smartax", @@ -41,136 +41,147 @@ "discovery": { "processors": [ { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, + "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.0", + "processor_index": "0", + "processor_type": "smartax", + "processor_usage": 9, + "processor_descr": "H806GPBD processor", + "processor_precision": 1, + "processor_perc_warn": 75 + }, + { + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.1", "processor_index": "1", "processor_type": "smartax", - "processor_usage": "19", + "processor_usage": 19, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.2", "processor_index": "2", "processor_type": "smartax", - "processor_usage": "16", + "processor_usage": 16, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.3", "processor_index": "3", "processor_type": "smartax", - "processor_usage": "19", + "processor_usage": 19, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.4", "processor_index": "4", "processor_type": "smartax", - "processor_usage": "17", + "processor_usage": 17, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.5", "processor_index": "5", "processor_type": "smartax", - "processor_usage": "19", + "processor_usage": 19, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.6", "processor_index": "6", "processor_type": "smartax", - "processor_usage": "15", + "processor_usage": 15, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.7", "processor_index": "7", "processor_type": "smartax", - "processor_usage": "7", + "processor_usage": 7, "processor_descr": "H802SCUN processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.8", "processor_index": "8", "processor_type": "smartax", - "processor_usage": "26", + "processor_usage": 26, "processor_descr": "H802SCUN processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.9", "processor_index": "9", "processor_type": "smartax", - "processor_usage": "16", + "processor_usage": 16, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.10", "processor_index": "10", "processor_type": "smartax", - "processor_usage": "15", + "processor_usage": 15, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.11", "processor_index": "11", "processor_type": "smartax", - "processor_usage": "15", + "processor_usage": 15, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 }, { - "entPhysicalIndex": "0", - "hrDeviceIndex": "0", + "entPhysicalIndex": 0, + "hrDeviceIndex": 0, "processor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.12", "processor_index": "12", "processor_type": "smartax", - "processor_usage": "14", + "processor_usage": 14, "processor_descr": "H805GPFD processor", - "processor_precision": "1", - "processor_perc_warn": "75" + "processor_precision": 1, + "processor_perc_warn": 75 } ] }, @@ -180,21 +191,21 @@ "discovery": { "sensors": [ { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", - "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.1.1.11.0", + "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.0", "sensor_index": "0", "sensor_type": "smartax", - "sensor_descr": "Chassis Total", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "696", - "sensor_limit": "1044", + "sensor_descr": "H806GPBD", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 46, + "sensor_limit": 69, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -203,21 +214,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.1", "sensor_index": "1", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -226,21 +237,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.10", "sensor_index": "10", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -249,21 +260,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.11", "sensor_index": "11", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -272,21 +283,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.12", "sensor_index": "12", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -295,21 +306,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.17", "sensor_index": "17", "sensor_type": "smartax", "sensor_descr": "H801X2CS", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "18", - "sensor_limit": "27", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 18, + "sensor_limit": 27, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -318,21 +329,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.18", "sensor_index": "18", "sensor_type": "smartax", "sensor_descr": "H801X2CS", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "18", - "sensor_limit": "27", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 18, + "sensor_limit": 27, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -341,21 +352,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.2", "sensor_index": "2", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -364,21 +375,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.3", "sensor_index": "3", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -387,21 +398,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.4", "sensor_index": "4", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -410,21 +421,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.5", "sensor_index": "5", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -433,21 +444,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.6", "sensor_index": "6", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -456,21 +467,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.7", "sensor_index": "7", "sensor_type": "smartax", "sensor_descr": "H802SCUN", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -479,21 +490,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.8", "sensor_index": "8", "sensor_type": "smartax", "sensor_descr": "H802SCUN", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -502,21 +513,67 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "power", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.9", "sensor_index": "9", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "50", - "sensor_limit": "75", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 50, + "sensor_limit": 75, "sensor_limit_warn": null, "sensor_limit_low": null, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "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": "power", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.1.1.11.0", + "sensor_index": "0", + "sensor_type": "smartax-total", + "sensor_descr": "Chassis Total", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 696, + "sensor_limit": 1044, + "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": "temperature", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.0", + "sensor_index": "0", + "sensor_type": "smartax", + "sensor_descr": "H806GPBD", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 51, + "sensor_limit": 71, + "sensor_limit_warn": null, + "sensor_limit_low": 41, + "sensor_limit_low_warn": null, + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -525,21 +582,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.1", "sensor_index": "1", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "31", - "sensor_limit": "51", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 31, + "sensor_limit": 51, "sensor_limit_warn": null, - "sensor_limit_low": "21", + "sensor_limit_low": 21, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -548,21 +605,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.10", "sensor_index": "10", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "30", - "sensor_limit": "50", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 30, + "sensor_limit": 50, "sensor_limit_warn": null, - "sensor_limit_low": "20", + "sensor_limit_low": 20, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -571,21 +628,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.11", "sensor_index": "11", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "30", - "sensor_limit": "50", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 30, + "sensor_limit": 50, "sensor_limit_warn": null, - "sensor_limit_low": "20", + "sensor_limit_low": 20, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -594,21 +651,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.12", "sensor_index": "12", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "29", - "sensor_limit": "49", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 29, + "sensor_limit": 49, "sensor_limit_warn": null, - "sensor_limit_low": "19", + "sensor_limit_low": 19, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -617,21 +674,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.17", "sensor_index": "17", "sensor_type": "smartax", "sensor_descr": "H801X2CS", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "30", - "sensor_limit": "50", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 30, + "sensor_limit": 50, "sensor_limit_warn": null, - "sensor_limit_low": "20", + "sensor_limit_low": 20, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -640,21 +697,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.18", "sensor_index": "18", "sensor_type": "smartax", "sensor_descr": "H801X2CS", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "28", - "sensor_limit": "48", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 28, + "sensor_limit": 48, "sensor_limit_warn": null, - "sensor_limit_low": "18", + "sensor_limit_low": 18, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -663,21 +720,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.2", "sensor_index": "2", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "31", - "sensor_limit": "51", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 31, + "sensor_limit": 51, "sensor_limit_warn": null, - "sensor_limit_low": "21", + "sensor_limit_low": 21, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -686,21 +743,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.3", "sensor_index": "3", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "31", - "sensor_limit": "51", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 31, + "sensor_limit": 51, "sensor_limit_warn": null, - "sensor_limit_low": "21", + "sensor_limit_low": 21, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -709,21 +766,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.4", "sensor_index": "4", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "30", - "sensor_limit": "50", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 30, + "sensor_limit": 50, "sensor_limit_warn": null, - "sensor_limit_low": "20", + "sensor_limit_low": 20, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -732,21 +789,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.5", "sensor_index": "5", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "31", - "sensor_limit": "51", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 31, + "sensor_limit": 51, "sensor_limit_warn": null, - "sensor_limit_low": "21", + "sensor_limit_low": 21, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -755,21 +812,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.6", "sensor_index": "6", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "31", - "sensor_limit": "51", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 31, + "sensor_limit": 51, "sensor_limit_warn": null, - "sensor_limit_low": "21", + "sensor_limit_low": 21, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -778,21 +835,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.7", "sensor_index": "7", "sensor_type": "smartax", "sensor_descr": "H802SCUN", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "37", - "sensor_limit": "57", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 37, + "sensor_limit": 57, "sensor_limit_warn": null, - "sensor_limit_low": "27", + "sensor_limit_low": 27, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -801,21 +858,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.8", "sensor_index": "8", "sensor_type": "smartax", "sensor_descr": "H802SCUN", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "39", - "sensor_limit": "59", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 39, + "sensor_limit": 59, "sensor_limit_warn": null, - "sensor_limit_low": "29", + "sensor_limit_low": 29, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, @@ -824,21 +881,21 @@ "state_name": null }, { - "sensor_deleted": "0", + "sensor_deleted": 0, "sensor_class": "temperature", "poller_type": "snmp", "sensor_oid": ".1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.9", "sensor_index": "9", "sensor_type": "smartax", "sensor_descr": "H805GPFD", - "sensor_divisor": "1", - "sensor_multiplier": "1", - "sensor_current": "30", - "sensor_limit": "50", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 30, + "sensor_limit": 50, "sensor_limit_warn": null, - "sensor_limit_low": "20", + "sensor_limit_low": 20, "sensor_limit_low_warn": null, - "sensor_alert": "1", + "sensor_alert": 1, "sensor_custom": "No", "entPhysicalIndex": null, "entPhysicalIndex_measured": null, diff --git a/tests/snmpsim/smartax.snmprec b/tests/snmpsim/smartax.snmprec index 01d1c5dd031d..b31835194290 100644 --- a/tests/snmpsim/smartax.snmprec +++ b/tests/snmpsim/smartax.snmprec @@ -4,10 +4,105 @@ 1.3.6.1.2.1.1.4.0|4| 1.3.6.1.2.1.1.5.0|4| 1.3.6.1.2.1.1.6.0|4| +1.3.6.1.2.1.4.3.0|65|893132 +1.3.6.1.2.1.4.4.0|65|351598 +1.3.6.1.2.1.4.5.0|65|0 +1.3.6.1.2.1.4.6.0|65|37079 +1.3.6.1.2.1.4.7.0|65|1293 +1.3.6.1.2.1.4.8.0|65|0 +1.3.6.1.2.1.4.9.0|65|532493 +1.3.6.1.2.1.4.10.0|65|869077 +1.3.6.1.2.1.4.11.0|65|0 +1.3.6.1.2.1.4.12.0|65|368 +1.3.6.1.2.1.4.14.0|65|0 +1.3.6.1.2.1.4.15.0|65|0 +1.3.6.1.2.1.4.16.0|65|0 +1.3.6.1.2.1.4.17.0|65|25005 +1.3.6.1.2.1.4.18.0|65|0 +1.3.6.1.2.1.4.19.0|65|50010 +1.3.6.1.2.1.5.1.0|65|51137 +1.3.6.1.2.1.5.2.0|65|5 +1.3.6.1.2.1.5.3.0|65|1287 +1.3.6.1.2.1.5.4.0|65|23 +1.3.6.1.2.1.5.5.0|65|0 +1.3.6.1.2.1.5.6.0|65|0 +1.3.6.1.2.1.5.7.0|65|0 +1.3.6.1.2.1.5.8.0|65|49815 +1.3.6.1.2.1.5.9.0|65|7 +1.3.6.1.2.1.5.10.0|65|0 +1.3.6.1.2.1.5.11.0|65|0 +1.3.6.1.2.1.5.12.0|65|0 +1.3.6.1.2.1.5.13.0|65|0 +1.3.6.1.2.1.5.14.0|65|401813 +1.3.6.1.2.1.5.15.0|65|0 +1.3.6.1.2.1.5.16.0|65|516 +1.3.6.1.2.1.5.17.0|65|351467 +1.3.6.1.2.1.5.18.0|65|0 +1.3.6.1.2.1.5.19.0|65|0 +1.3.6.1.2.1.5.20.0|65|0 +1.3.6.1.2.1.5.21.0|65|15 +1.3.6.1.2.1.5.22.0|65|49815 +1.3.6.1.2.1.5.23.0|65|0 +1.3.6.1.2.1.5.24.0|65|0 +1.3.6.1.2.1.5.25.0|65|0 +1.3.6.1.2.1.5.26.0|65|0 +1.3.6.1.2.1.6.5.0|65|5 +1.3.6.1.2.1.6.6.0|65|3654 +1.3.6.1.2.1.6.7.0|65|1178 +1.3.6.1.2.1.6.8.0|65|153 +1.3.6.1.2.1.6.9.0|66|0 +1.3.6.1.2.1.6.10.0|65|62785 +1.3.6.1.2.1.6.11.0|65|48686 +1.3.6.1.2.1.6.12.0|65|276 +1.3.6.1.2.1.6.14.0|65|58 +1.3.6.1.2.1.6.15.0|65|25159 +1.3.6.1.2.1.6.17.0|70|62785 +1.3.6.1.2.1.6.18.0|70|48686 +1.3.6.1.2.1.7.1.0|65|418602 +1.3.6.1.2.1.7.2.0|65|1483 +1.3.6.1.2.1.7.3.0|65|0 +1.3.6.1.2.1.7.4.0|65|418339 +1.3.6.1.2.1.11.1.0|65|416549 +1.3.6.1.2.1.11.2.0|65|416940 +1.3.6.1.2.1.11.3.0|65|0 +1.3.6.1.2.1.11.4.0|65|0 +1.3.6.1.2.1.11.5.0|65|0 +1.3.6.1.2.1.11.6.0|65|0 +1.3.6.1.2.1.11.8.0|65|0 +1.3.6.1.2.1.11.9.0|65|0 +1.3.6.1.2.1.11.10.0|65|0 +1.3.6.1.2.1.11.11.0|65|0 +1.3.6.1.2.1.11.12.0|65|0 +1.3.6.1.2.1.11.13.0|65|480557 +1.3.6.1.2.1.11.14.0|65|105 +1.3.6.1.2.1.11.15.0|65|256193 +1.3.6.1.2.1.11.16.0|65|3244 +1.3.6.1.2.1.11.17.0|65|18 +1.3.6.1.2.1.11.18.0|65|0 +1.3.6.1.2.1.11.19.0|65|0 +1.3.6.1.2.1.11.20.0|65|0 +1.3.6.1.2.1.11.21.0|65|0 +1.3.6.1.2.1.11.22.0|65|0 +1.3.6.1.2.1.11.24.0|65|0 +1.3.6.1.2.1.11.25.0|65|0 +1.3.6.1.2.1.11.26.0|65|0 +1.3.6.1.2.1.11.27.0|65|0 +1.3.6.1.2.1.11.28.0|65|416550 +1.3.6.1.2.1.11.29.0|65|392 +1.3.6.1.2.1.11.30.0|2|1 1.3.6.1.2.1.47.1.1.1.1.2.36|4|MA5600T,H80E1FCBC,Fan Box for Service Shelf(8 Fan) 1.3.6.1.2.1.47.1.1.1.1.2.875160|4|MA5600T 1.3.6.1.2.1.47.1.1.1.1.2.888624|4|MA5600T,H801MABH,Multi-service Access Backplane,1*1 1.3.6.1.2.1.47.1.1.1.1.2.889032|4|SLOT-300 +1.3.6.1.2.1.47.1.1.1.1.2.889236|4|Manufactured Board,MA5600T,H806GPBD,8-port GPON OLT Interface Board,1*1 +1.3.6.1.2.1.47.1.1.1.1.2.889237|4| +1.3.6.1.2.1.47.1.1.1.1.2.889238|4| +1.3.6.1.2.1.47.1.1.1.1.2.889239|4| +1.3.6.1.2.1.47.1.1.1.1.2.889240|4| +1.3.6.1.2.1.47.1.1.1.1.2.889241|4| +1.3.6.1.2.1.47.1.1.1.1.2.889242|4| +1.3.6.1.2.1.47.1.1.1.1.2.889243|4| +1.3.6.1.2.1.47.1.1.1.1.2.889244|4| 1.3.6.1.2.1.47.1.1.1.1.2.889440|4|SLOT-300 1.3.6.1.2.1.47.1.1.1.1.2.889644|4|Manufactured Board,MA5600T,H805GPFD,16 ports GPON OLT Interface Board,1*1 1.3.6.1.2.1.47.1.1.1.1.2.889645|4| @@ -116,6 +211,7 @@ 1.3.6.1.2.1.47.1.1.1.1.2.891698|4| 1.3.6.1.2.1.47.1.1.1.1.2.891699|4| 1.3.6.1.2.1.47.1.1.1.1.2.891700|4| +1.3.6.1.2.1.47.1.1.1.1.2.891718|4|SUB-SLOT-300 1.3.6.1.2.1.47.1.1.1.1.2.891888|4|SLOT-300 1.3.6.1.2.1.47.1.1.1.1.2.892092|4|MA5600T,H802SCUN,Super Control Unit Board,1*1 1.3.6.1.2.1.47.1.1.1.1.2.892126|4|SUB-SLOT-300 @@ -242,6 +338,15 @@ 1.3.6.1.2.1.47.1.1.1.1.7.875160|4|tcb-gpon2 1.3.6.1.2.1.47.1.1.1.1.7.888624|4|H801MABH 1.3.6.1.2.1.47.1.1.1.1.7.889032|4|SLOT-300 +1.3.6.1.2.1.47.1.1.1.1.7.889236|4|H806GPBD +1.3.6.1.2.1.47.1.1.1.1.7.889237|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.889238|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.889239|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.889240|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.889241|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.889242|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.889243|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.889244|4|GPON_UNI 1.3.6.1.2.1.47.1.1.1.1.7.889440|4|SLOT-300 1.3.6.1.2.1.47.1.1.1.1.7.889644|4|H805GPFD 1.3.6.1.2.1.47.1.1.1.1.7.889645|4|GPON_UNI @@ -350,6 +455,7 @@ 1.3.6.1.2.1.47.1.1.1.1.7.891698|4|GPON_UNI 1.3.6.1.2.1.47.1.1.1.1.7.891699|4|GPON_UNI 1.3.6.1.2.1.47.1.1.1.1.7.891700|4|GPON_UNI +1.3.6.1.2.1.47.1.1.1.1.7.891718|4|SUB-SLOT-300 1.3.6.1.2.1.47.1.1.1.1.7.891888|4|SLOT-300 1.3.6.1.2.1.47.1.1.1.1.7.892092|4|H802SCUN 1.3.6.1.2.1.47.1.1.1.1.7.892126|4|SUB-SLOT-300 @@ -473,6 +579,7 @@ 1.3.6.1.2.1.47.1.1.1.1.7.28005120|4|tcb-gpon2 1.3.6.1.2.1.47.1.1.1.1.7.28880280|4|tcb-gpon2 1.3.6.1.4.1.2011.2.6.7.1.1.1.1.11.0|2|696 +1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.0|2|9 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.1|2|19 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.2|2|16 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.3|2|19 @@ -487,6 +594,7 @@ 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.12|2|14 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.17|2|-1 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5.0.18|2|-1 +1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0.0|4|H806GPBD 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0.1|4|H805GPFD 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0.2|4|H805GPFD 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0.3|4|H805GPFD @@ -501,6 +609,7 @@ 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0.12|4|H805GPFD 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0.17|4|H801X2CS 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0.18|4|H801X2CS +1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.0|2|51 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.1|2|31 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.2|2|31 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.3|2|31 @@ -515,6 +624,7 @@ 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.12|2|29 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.17|2|30 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.10.0.18|2|28 +1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.0|2|46 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.1|2|50 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.2|2|50 1.3.6.1.4.1.2011.2.6.7.1.1.2.1.11.0.3|2|50