From 4397ed4a728b0b3d91c9c4bc7a7fcb4f9217b3a9 Mon Sep 17 00:00:00 2001 From: barryodonovan Date: Fri, 10 Feb 2017 11:51:00 +0000 Subject: [PATCH] fix: Correct snmp_get of sysDescr.0 to identify PMP450 as AP (#5849) --- html/includes/graphs/device/canopy_generic_regCount.inc.php | 2 ++ .../graphs/device/canopy_generic_whispGPSStats.inc.php | 3 +++ includes/definitions/canopy.yaml | 1 + includes/polling/os/canopy.inc.php | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/html/includes/graphs/device/canopy_generic_regCount.inc.php b/html/includes/graphs/device/canopy_generic_regCount.inc.php index 37c50add8e..4a5985e846 100644 --- a/html/includes/graphs/device/canopy_generic_regCount.inc.php +++ b/html/includes/graphs/device/canopy_generic_regCount.inc.php @@ -9,6 +9,8 @@ * the source code distribution for details. */ +$scale_min = 0; + require 'includes/graphs/common.inc.php'; $rrdfilename = rrd_name($device['hostname'], 'canopy-generic-regCount'); if (file_exists($rrdfilename)) { diff --git a/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php b/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php index 8c03fdb350..8a400528c7 100644 --- a/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php +++ b/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php @@ -8,6 +8,9 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ + +$scale_min = 0; + require 'includes/graphs/common.inc.php'; $rrdfilename = rrd_name($device['hostname'], 'canopy-generic-whispGPSStats'); if (file_exists($rrdfilename)) { diff --git a/includes/definitions/canopy.yaml b/includes/definitions/canopy.yaml index 2920f8fc73..0eab757be2 100644 --- a/includes/definitions/canopy.yaml +++ b/includes/definitions/canopy.yaml @@ -4,6 +4,7 @@ type: wireless icon: cambium over: - { graph: device_bits, text: 'Device Traffic' } + - { graph: device_canopy_generic_regCount, text: 'Registered SMs' } group: cambium discovery: - sysDescr_regex: diff --git a/includes/polling/os/canopy.inc.php b/includes/polling/os/canopy.inc.php index 22855f5f61..3baeb8b6bb 100644 --- a/includes/polling/os/canopy.inc.php +++ b/includes/polling/os/canopy.inc.php @@ -9,7 +9,7 @@ * the source code distribution for details. */ -$cambium_type = snmp_get($device, 'sysDescr.0', '-Oqv', ''); +$cambium_type = $poll_device['sysDescr']; $PMP = snmp_get($device, 'boxDeviceType.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'); $version = $cambium_type; $filtered_words = array(