From 6c3473a7f8c8ab0d9578ddda0a7f0939640ca2a5 Mon Sep 17 00:00:00 2001 From: James Andrewartha Date: Mon, 5 Mar 2018 23:46:59 +0800 Subject: [PATCH] ewc: more WirelessSensors and processor/mempools support (#8294) * Add Errors, NoiseFloor, RSSI, SNR and Utilization Wireless Sensors for ewc * Enable processor/mempool support for ewc using existing enterasys implementation * Add test data --- LibreNMS/OS/Ewc.php | 176 ++++- includes/definitions/discovery/ewc.yaml | 9 + includes/definitions/ewc.yaml | 4 + includes/discovery/mempools/enterasys.inc.php | 2 +- tests/data/ewc.json | 726 ++++++++++++++++++ tests/snmpsim/ewc.snmprec | 32 +- 6 files changed, 946 insertions(+), 3 deletions(-) create mode 100644 includes/definitions/discovery/ewc.yaml create mode 100644 tests/data/ewc.json diff --git a/LibreNMS/OS/Ewc.php b/LibreNMS/OS/Ewc.php index ab1a6c6361..20d5f2c8fd 100644 --- a/LibreNMS/OS/Ewc.php +++ b/LibreNMS/OS/Ewc.php @@ -28,12 +28,23 @@ namespace LibreNMS\OS; use LibreNMS\Device\WirelessSensor; use LibreNMS\Interfaces\Discovery\Sensors\WirelessApCountDiscovery; use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessErrorsDiscovery; use LibreNMS\Interfaces\Discovery\Sensors\WirelessFrequencyDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessNoiseFloorDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessUtilizationDiscovery; use LibreNMS\OS; class Ewc extends OS implements WirelessApCountDiscovery, - WirelessClientsDiscovery + WirelessClientsDiscovery, + WirelessErrorsDiscovery, + WirelessFrequencyDiscovery, + WirelessNoiseFloorDiscovery, + WirelessRssiDiscovery, + WirelessSnrDiscovery, + WirelessUtilizationDiscovery { /** * Discover wireless AP count. @@ -127,4 +138,167 @@ class Ewc extends OS implements } return $sensors; } + + /** + * Discover wireless bit errors. This is in total bits. Type is errors. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessErrors() + { + $oids = snmpwalk_cache_oid($this->getDevice(), 'apPerfRadioPktRetx', array(), 'HIPATH-WIRELESS-HWC-MIB'); + $ap_interfaces = $this->getCacheByIndex('apName', 'HIPATH-WIRELESS-HWC-MIB'); + + $sensors = array(); + foreach ($oids as $index => $entry) { + $name = $ap_interfaces[explode('.', $index)[0]]; + $sensors[] = new WirelessSensor( + 'errors', + $this->getDeviceId(), + '.1.3.6.1.4.1.4329.15.3.5.2.5.1.18.' . $index, + 'ewc', + $index . 'Retx', + "Retransmits ($name radio " . explode('.', $index)[1]. ")" + ); + } + return $sensors; + } + + /** + * Discover wireless frequency. This is in MHz. Type is frequency. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessFrequency() + { + $oids = snmpwalk_cache_oid($this->getDevice(), 'apRadioStatusChannel', array(), 'HIPATH-WIRELESS-HWC-MIB'); + $ap_interfaces = $this->getCacheByIndex('ifName', 'IF-MIB'); + + $sensors = array(); + foreach ($oids as $index => $entry) { + $name = $ap_interfaces[$index]; + $sensors[] = new WirelessSensor( + 'frequency', + $this->getDeviceId(), + '.1.3.6.1.4.1.4329.15.3.5.2.4.1.1.' . $index, + 'ewc', + $index, + "Frequency ($name)" + ); + } + return $sensors; + } + + /** + * Discover wireless noise floor. This is in dBm. Type is noise-floor. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessNoiseFloor() + { + $oids = snmpwalk_cache_oid($this->getDevice(), 'dot11ExtRadioMaxNfCount', array(), 'HIPATH-WIRELESS-DOT11-EXTNS-MIB'); + $ap_interfaces = $this->getCacheByIndex('ifName', 'IF-MIB'); + + $sensors = array(); + foreach ($oids as $index => $entry) { + $name = $ap_interfaces[$index]; + $noisefloor = $entry['dot11ExtRadioMaxNfCount']; + $sensors[] = new WirelessSensor( + 'noise-floor', + $this->getDeviceId(), + '.1.3.6.1.4.1.4329.15.3.1.4.3.1.32.' . $index, + 'ewc', + $index, + "Noise floor ($name)", + $noisefloor, + 1, + 1, + 'sum', + null, + -75 + ); + } + return $sensors; + } + + /** + * Discover wireless RSSI (Received Signal Strength Indicator). This is in dBm. Type is rssi + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessRssi() + { + $oids = snmpwalk_cache_oid($this->getDevice(), 'apPerfRadioCurrentRSS', array(), 'HIPATH-WIRELESS-HWC-MIB'); + $ap_interfaces = $this->getCacheByIndex('apName', 'HIPATH-WIRELESS-HWC-MIB'); + + $sensors = array(); + foreach ($oids as $index => $entry) { + $name = $ap_interfaces[explode('.', $index)[0]]; + $sensors[] = new WirelessSensor( + 'rssi', + $this->getDeviceId(), + '.1.3.6.1.4.1.4329.15.3.5.2.5.1.9.' . $index, + 'ewc', + $index, + "RSS ($name radio " . explode('.', $index)[1]. ")" + ); + } + return $sensors; + } + + /** + * Discover wireless SNR. This is in dB. Type is snr. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessSnr() + { + $oids = snmpwalk_cache_oid($this->getDevice(), 'apPerfRadioCurrentSNR', array(), 'HIPATH-WIRELESS-HWC-MIB'); + $ap_interfaces = $this->getCacheByIndex('apName', 'HIPATH-WIRELESS-HWC-MIB'); + + $sensors = array(); + foreach ($oids as $index => $entry) { + $name = $ap_interfaces[explode('.', $index)[0]]; + $sensors[] = new WirelessSensor( + 'snr', + $this->getDeviceId(), + '.1.3.6.1.4.1.4329.15.3.5.2.5.1.13.' . $index, + 'ewc', + $index, + "SNR ($name radio " . explode('.', $index)[1]. ")" + ); + } + return $sensors; + } + + /** + * Discover wireless utilization. This is in %. Type is utilization. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessUtilization() + { + $oids = snmpwalk_cache_oid($this->getDevice(), 'apPerfRadioCurrentChannelUtilization', array(), 'HIPATH-WIRELESS-HWC-MIB'); + $ap_interfaces = $this->getCacheByIndex('apName', 'HIPATH-WIRELESS-HWC-MIB'); + + $sensors = array(); + foreach ($oids as $index => $entry) { + $name = $ap_interfaces[explode('.', $index)[0]]; + $sensors[] = new WirelessSensor( + 'utilization', + $this->getDeviceId(), + '.1.3.6.1.4.1.4329.15.3.5.2.5.1.5.' . $index, + 'ewc', + $index, + "Utilization ($name radio " . explode('.', $index)[1]. ")" + ); + } + return $sensors; + } } diff --git a/includes/definitions/discovery/ewc.yaml b/includes/definitions/discovery/ewc.yaml new file mode 100644 index 0000000000..efe56d6ddc --- /dev/null +++ b/includes/definitions/discovery/ewc.yaml @@ -0,0 +1,9 @@ +mib: ENTERASYS-RESOURCE-UTILIZATION-MIB +modules: + processors: + data: + - + oid: etsysResourceCpuLoad5min + num_oid: '.1.3.6.1.4.1.5624.1.2.49.1.1.1.1.4.{{ $index }}' + index: '{{ $count }}' + precision: 10 diff --git a/includes/definitions/ewc.yaml b/includes/definitions/ewc.yaml index b1d7fd07b0..4f95e192f6 100644 --- a/includes/definitions/ewc.yaml +++ b/includes/definitions/ewc.yaml @@ -4,8 +4,12 @@ type: wireless icon: extreme over: - { graph: device_bits, text: 'Device Traffic' } + - { graph: device_processor, text: 'CPU Usage' } + - { graph: device_mempool, text: 'Memory Usage' } - { graph: device_wireless_ap-count, text: 'Connected APs' } - { graph: device_wireless_clients, text: 'Connected Clients' } discovery: - sysObjectID: - .1.3.6.1.4.1.4329.15.1.1. +mib_dir: + - enterasys diff --git a/includes/discovery/mempools/enterasys.inc.php b/includes/discovery/mempools/enterasys.inc.php index b8ef45cb4e..0db4a3af12 100644 --- a/includes/discovery/mempools/enterasys.inc.php +++ b/includes/discovery/mempools/enterasys.inc.php @@ -11,7 +11,7 @@ * the source code distribution for details. */ -if ($device['os'] == 'enterasys') { +if ($device['os'] == 'enterasys' || $device['os'] == 'ewc') { $enterasys_mem = snmpwalk_cache_threepart_oid($device, 'etsysResourceStorageTable', array(), 'ENTERASYS-RESOURCE-UTILIZATION-MIB'); foreach ($enterasys_mem as $index => $mem_data) { foreach ($mem_data['ram'] as $mem_id => $ram) { diff --git a/tests/data/ewc.json b/tests/data/ewc.json new file mode 100644 index 0000000000..2c9b726219 --- /dev/null +++ b/tests/data/ewc.json @@ -0,0 +1,726 @@ +{ + "wireless": { + "discovery": { + "wireless_sensors": [ + { + "sensor_deleted": "0", + "sensor_class": "ap-count", + "sensor_index": "0", + "sensor_type": "ewc", + "sensor_descr": "Connected APs", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "1", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.1.0\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "ap-count", + "sensor_index": "1", + "sensor_type": "ewc", + "sensor_descr": "Configured APs", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "1", + "sensor_prev": null, + "sensor_limit": "192", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.1.1.0\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "clients", + "sensor_index": "0", + "sensor_type": "ewc", + "sensor_descr": "Connected Clients", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "10", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.6.1.0\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "clients", + "sensor_index": "1", + "sensor_type": "ewc", + "sensor_descr": "Clients (TestAP)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "10", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.2.1.14.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "clients", + "sensor_index": "Test VNS", + "sensor_type": "ewc", + "sensor_descr": "SSID: Test VNS", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "10", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.3.4.5.1.2.101\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "utilization", + "sensor_index": "1.1", + "sensor_type": "ewc", + "sensor_descr": "Utilization (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "3", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.5.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "utilization", + "sensor_index": "1.2", + "sensor_type": "ewc", + "sensor_descr": "Utilization (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "2", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.5.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "snr", + "sensor_index": "1.1", + "sensor_type": "ewc", + "sensor_descr": "SNR (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "52", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.13.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "snr", + "sensor_index": "1.2", + "sensor_type": "ewc", + "sensor_descr": "SNR (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "27", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.13.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "rssi", + "sensor_index": "1.1", + "sensor_type": "ewc", + "sensor_descr": "RSS (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-44", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.9.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "rssi", + "sensor_index": "1.2", + "sensor_type": "ewc", + "sensor_descr": "RSS (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-71", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.9.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "noise-floor", + "sensor_index": "1001", + "sensor_type": "ewc", + "sensor_descr": "Noise floor (TestAP_r1_802.11a/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-94", + "sensor_prev": null, + "sensor_limit": "-75", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.1.4.3.1.32.1001\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "noise-floor", + "sensor_index": "1002", + "sensor_type": "ewc", + "sensor_descr": "Noise floor (TestAP_r2_802.11g/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-94", + "sensor_prev": null, + "sensor_limit": "-75", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.1.4.3.1.32.1002\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "errors", + "sensor_index": "1.1Retx", + "sensor_type": "ewc", + "sensor_descr": "Retransmits (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "362674", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.18.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "errors", + "sensor_index": "1.2Retx", + "sensor_type": "ewc", + "sensor_descr": "Retransmits (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "797769", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.18.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "frequency", + "sensor_index": "1001", + "sensor_type": "ewc", + "sensor_descr": "Frequency (TestAP_r1_802.11a/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "5220", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.4.1.1.1001\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "frequency", + "sensor_index": "1002", + "sensor_type": "ewc", + "sensor_descr": "Frequency (TestAP_r2_802.11g/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "2412", + "sensor_prev": null, + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.4.1.1.1002\"]" + } + ] + }, + "poller": { + "wireless_sensors": [ + { + "sensor_deleted": "0", + "sensor_class": "ap-count", + "sensor_index": "0", + "sensor_type": "ewc", + "sensor_descr": "Connected APs", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "1", + "sensor_prev": "1", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.1.0\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "ap-count", + "sensor_index": "1", + "sensor_type": "ewc", + "sensor_descr": "Configured APs", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "1", + "sensor_prev": "1", + "sensor_limit": "192", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.1.1.0\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "clients", + "sensor_index": "0", + "sensor_type": "ewc", + "sensor_descr": "Connected Clients", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "10", + "sensor_prev": "10", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.6.1.0\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "clients", + "sensor_index": "1", + "sensor_type": "ewc", + "sensor_descr": "Clients (TestAP)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "10", + "sensor_prev": "10", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.2.1.14.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "clients", + "sensor_index": "Test VNS", + "sensor_type": "ewc", + "sensor_descr": "SSID: Test VNS", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "10", + "sensor_prev": "10", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.3.4.5.1.2.101\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "utilization", + "sensor_index": "1.1", + "sensor_type": "ewc", + "sensor_descr": "Utilization (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "3", + "sensor_prev": "3", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.5.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "utilization", + "sensor_index": "1.2", + "sensor_type": "ewc", + "sensor_descr": "Utilization (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "2", + "sensor_prev": "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.5.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "snr", + "sensor_index": "1.1", + "sensor_type": "ewc", + "sensor_descr": "SNR (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "52", + "sensor_prev": "52", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.13.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "snr", + "sensor_index": "1.2", + "sensor_type": "ewc", + "sensor_descr": "SNR (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "27", + "sensor_prev": "27", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.13.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "rssi", + "sensor_index": "1.1", + "sensor_type": "ewc", + "sensor_descr": "RSS (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-44", + "sensor_prev": "-44", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.9.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "rssi", + "sensor_index": "1.2", + "sensor_type": "ewc", + "sensor_descr": "RSS (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-71", + "sensor_prev": "-71", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.9.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "noise-floor", + "sensor_index": "1001", + "sensor_type": "ewc", + "sensor_descr": "Noise floor (TestAP_r1_802.11a/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-94", + "sensor_prev": "-94", + "sensor_limit": "-75", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.1.4.3.1.32.1001\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "noise-floor", + "sensor_index": "1002", + "sensor_type": "ewc", + "sensor_descr": "Noise floor (TestAP_r2_802.11g/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "-94", + "sensor_prev": "-94", + "sensor_limit": "-75", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.1.4.3.1.32.1002\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "errors", + "sensor_index": "1.1Retx", + "sensor_type": "ewc", + "sensor_descr": "Retransmits (TestAP radio 1)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "362674", + "sensor_prev": "362674", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.18.1.1\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "errors", + "sensor_index": "1.2Retx", + "sensor_type": "ewc", + "sensor_descr": "Retransmits (TestAP radio 2)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "797769", + "sensor_prev": "797769", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.5.1.18.1.2\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "frequency", + "sensor_index": "1001", + "sensor_type": "ewc", + "sensor_descr": "Frequency (TestAP_r1_802.11a/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "5220", + "sensor_prev": "5220", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.4.1.1.1001\"]" + }, + { + "sensor_deleted": "0", + "sensor_class": "frequency", + "sensor_index": "1002", + "sensor_type": "ewc", + "sensor_descr": "Frequency (TestAP_r2_802.11g/n)", + "sensor_divisor": "1", + "sensor_multiplier": "1", + "sensor_aggregator": "sum", + "sensor_current": "2412", + "sensor_prev": "2412", + "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_oids": "[\".1.3.6.1.4.1.4329.15.3.5.2.4.1.1.1002\"]" + } + ] + } + } +} diff --git a/tests/snmpsim/ewc.snmprec b/tests/snmpsim/ewc.snmprec index cd595a2c66..11a4673665 100644 --- a/tests/snmpsim/ewc.snmprec +++ b/tests/snmpsim/ewc.snmprec @@ -1,2 +1,32 @@ 1.3.6.1.2.1.1.1.0|4|Extreme Networks Wireless Controller - V2110 Medium, System Version 10.21.04.0005 -1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.4329.15.1.1.13 \ No newline at end of file +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.4329.15.1.1.13 +1.3.6.1.2.1.1.3.0|67|599524800 +1.3.6.1.2.1.31.1.1.1.1.1|4|esa0 +1.3.6.1.2.1.31.1.1.1.1.2|4|esa1 +1.3.6.1.2.1.31.1.1.1.1.99|4|eth0 +1.3.6.1.2.1.31.1.1.1.1.101|4|Test +1.3.6.1.2.1.31.1.1.1.1.1000|4|TestAP_ethernet +1.3.6.1.2.1.31.1.1.1.1.1001|4|TestAP_r1_802.11a/n +1.3.6.1.2.1.31.1.1.1.1.1002|4|TestAP_r2_802.11g/n +1.3.6.1.4.1.4329.15.3.1.4.3.1.32.1001|2|-94 +1.3.6.1.4.1.4329.15.3.1.4.3.1.32.1002|2|-94 +1.3.6.1.4.1.4329.15.3.2.10.1.7.0|66|168 +1.3.6.1.4.1.4329.15.3.2.10.1.8.0|66|24 +1.3.6.1.4.1.4329.15.3.3.4.4.1.4.101|4|Test VNS +1.3.6.1.4.1.4329.15.3.3.4.5.1.2.101|65|10 +1.3.6.1.4.1.4329.15.3.5.1.1.0|2|1 +1.3.6.1.4.1.4329.15.3.5.1.2.1.2.1|4|TestAP +1.3.6.1.4.1.4329.15.3.5.2.1.0|2|1 +1.3.6.1.4.1.4329.15.3.5.2.2.1.14.1|66|10 +1.3.6.1.4.1.4329.15.3.5.2.4.1.1.1001|66|5220 +1.3.6.1.4.1.4329.15.3.5.2.4.1.1.1002|66|2412 +1.3.6.1.4.1.4329.15.3.5.2.5.1.5.1.1|66|3 +1.3.6.1.4.1.4329.15.3.5.2.5.1.5.1.2|66|2 +1.3.6.1.4.1.4329.15.3.5.2.5.1.9.1.1|2|-44 +1.3.6.1.4.1.4329.15.3.5.2.5.1.9.1.2|2|-71 +1.3.6.1.4.1.4329.15.3.5.2.5.1.13.1.1|2|52 +1.3.6.1.4.1.4329.15.3.5.2.5.1.13.1.2|2|27 +1.3.6.1.4.1.4329.15.3.5.2.5.1.18.1.1|70|362674 +1.3.6.1.4.1.4329.15.3.5.2.5.1.18.1.2|70|797769 +1.3.6.1.4.1.4329.15.3.6.1.0|2|10 +1.3.6.1.6.3.10.2.1.3.0|2|5995149