From 13e05f6858cb27e1f334b7a87baca02f714c58b5 Mon Sep 17 00:00:00 2001 From: Paul Heinrichs Date: Wed, 6 Apr 2016 08:16:53 -0400 Subject: [PATCH 1/5] Removed unused cambium files Unused due to canopy/cambium split --- .../cambium_generic_450_linkRadioDbm.inc.php | 26 -------------- .../cambium_generic_450_masterSSR.inc.php | 21 ----------- .../cambium_generic_450_powerlevel.inc.php | 21 ----------- .../device/cambium_generic_450_ptpSNR.inc.php | 26 -------------- .../cambium_generic_450_slaveHV.inc.php | 26 -------------- .../cambium_generic_450_slaveSNR.inc.php | 26 -------------- .../cambium_generic_450_slaveSSR.inc.php | 21 ----------- .../device/cambium_generic_crcErrors.inc.php | 22 ------------ .../device/cambium_generic_errorCount.inc.php | 26 -------------- .../device/cambium_generic_freq.inc.php | 18 ---------- .../device/cambium_generic_gpsStats.inc.php | 26 -------------- .../device/cambium_generic_jitter.inc.php | 21 ----------- .../device/cambium_generic_radioDbm.inc.php | 36 ------------------- .../device/cambium_generic_regCount.inc.php | 26 -------------- .../device/cambium_generic_rssi.inc.php | 21 ----------- .../device/cambium_generic_signalHV.inc.php | 31 ---------------- .../device/cambium_generic_snrHV.inc.php | 26 -------------- .../cambium_generic_whispGPSStats.inc.php | 18 ---------- 18 files changed, 438 deletions(-) delete mode 100644 html/includes/graphs/device/cambium_generic_450_linkRadioDbm.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_450_masterSSR.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_450_powerlevel.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_450_ptpSNR.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_450_slaveHV.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_450_slaveSNR.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_450_slaveSSR.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_crcErrors.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_errorCount.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_freq.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_gpsStats.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_jitter.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_radioDbm.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_regCount.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_rssi.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_signalHV.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_snrHV.inc.php delete mode 100644 html/includes/graphs/device/cambium_generic_whispGPSStats.inc.php diff --git a/html/includes/graphs/device/cambium_generic_450_linkRadioDbm.inc.php b/html/includes/graphs/device/cambium_generic_450_linkRadioDbm.inc.php deleted file mode 100644 index 1c643a71d..000000000 --- a/html/includes/graphs/device/cambium_generic_450_linkRadioDbm.inc.php +++ /dev/null @@ -1,26 +0,0 @@ - Date: Wed, 6 Apr 2016 08:19:30 -0400 Subject: [PATCH 2/5] Cambium graph changes --- .../includes/graphs/device/cambium_250_modulationMode.inc.php | 3 ++- html/includes/graphs/device/cambium_250_transmitPower.inc.php | 3 ++- .../includes/graphs/device/cambium_650_modulationMode.inc.php | 3 ++- html/includes/graphs/device/cambium_650_transmitPower.inc.php | 3 ++- html/includes/graphs/device/cambium_epmp_gps.inc.php | 4 ++-- html/includes/graphs/device/cambium_epmp_gpsSync.inc.php | 3 ++- html/includes/graphs/device/cambium_epmp_registeredSM.inc.php | 3 ++- .../graphs/device/canopy_generic_whispGPSStats.inc.php | 2 ++ 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/html/includes/graphs/device/cambium_250_modulationMode.inc.php b/html/includes/graphs/device/cambium_250_modulationMode.inc.php index 01fa4118f..ec6adab90 100644 --- a/html/includes/graphs/device/cambium_250_modulationMode.inc.php +++ b/html/includes/graphs/device/cambium_250_modulationMode.inc.php @@ -16,6 +16,7 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'Mode Now Ave Max \\n'"; $rrd_options .= ' DEF:rxModulation='.$rrdfilename.':rxModulation:AVERAGE '; $rrd_options .= ' DEF:txModulation='.$rrdfilename.':txModulation:AVERAGE '; + $rrd_options .= " -l 0 "; $rrd_options .= " LINE2:rxModulation#0000FF:'Receive Modulation ' "; $rrd_options .= ' GPRINT:rxModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:rxModulation:MIN:%0.2lf%s '; @@ -24,4 +25,4 @@ if (file_exists($rrdfilename)) { $rrd_options .= ' GPRINT:txModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_250_transmitPower.inc.php b/html/includes/graphs/device/cambium_250_transmitPower.inc.php index 7206e02a9..82a8436f9 100644 --- a/html/includes/graphs/device/cambium_250_transmitPower.inc.php +++ b/html/includes/graphs/device/cambium_250_transmitPower.inc.php @@ -16,7 +16,8 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'dBm Now Ave Max \\n'"; $rrd_options .= ' DEF:transmitPower='.$rrdfilename.':transmitPower:AVERAGE '; $rrd_options .= " LINE2:transmitPower#FF0000:'Transmit Power ' "; + $rrd_options .= " -l 0 "; $rrd_options .= ' GPRINT:transmitPower:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_650_modulationMode.inc.php b/html/includes/graphs/device/cambium_650_modulationMode.inc.php index cb8a62da0..81a83aad1 100644 --- a/html/includes/graphs/device/cambium_650_modulationMode.inc.php +++ b/html/includes/graphs/device/cambium_650_modulationMode.inc.php @@ -16,6 +16,7 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'Mode Now Ave Max \\n'"; $rrd_options .= ' DEF:rxModulation='.$rrdfilename.':rxModulation:AVERAGE '; $rrd_options .= ' DEF:txModulation='.$rrdfilename.':txModulation:AVERAGE '; + $rrd_options .= " -l 0 "; $rrd_options .= " LINE2:rxModulation#0000FF:'Receive Modulation ' "; $rrd_options .= ' GPRINT:rxModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:rxModulation:MIN:%0.2lf%s '; @@ -24,4 +25,4 @@ if (file_exists($rrdfilename)) { $rrd_options .= ' GPRINT:txModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_650_transmitPower.inc.php b/html/includes/graphs/device/cambium_650_transmitPower.inc.php index 565a75eef..46af92e3a 100644 --- a/html/includes/graphs/device/cambium_650_transmitPower.inc.php +++ b/html/includes/graphs/device/cambium_650_transmitPower.inc.php @@ -15,8 +15,9 @@ $rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-650-transmit if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'dBm Now Ave Max \\n'"; $rrd_options .= ' DEF:transmitPower='.$rrdfilename.':transmitPower:AVERAGE '; + $rrd_options .= " -l 0 "; $rrd_options .= " LINE2:transmitPower#FF0000:'Transmit Power ' "; $rrd_options .= ' GPRINT:transmitPower:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_epmp_gps.inc.php b/html/includes/graphs/device/cambium_epmp_gps.inc.php index 548c5f9d7..46d27c6fc 100644 --- a/html/includes/graphs/device/cambium_epmp_gps.inc.php +++ b/html/includes/graphs/device/cambium_epmp_gps.inc.php @@ -14,7 +14,7 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'dBm Now Ave Max \\n'"; $rrd_options .= ' DEF:numTracked='.$rrdfilename.':numTracked:AVERAGE '; $rrd_options .= ' DEF:numVisible='.$rrdfilename.':numVisible:AVERAGE '; - $rrd_options .= " LINE2:numTracked#FF0000:'GPS Number Tracked ' "; + $rrd_options .= " AREA:numTracked#00B200:'GPS Number Tracked ' "; $rrd_options .= ' GPRINT:numTracked:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:numTracked:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:numTracked:MAX:%0.2lf%s\\\l '; @@ -22,4 +22,4 @@ if (file_exists($rrdfilename)) { $rrd_options .= ' GPRINT:numVisible:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:numVisible:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:numVisible:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php b/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php index cf08b8b13..a6f3f3421 100644 --- a/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php +++ b/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php @@ -13,7 +13,8 @@ $rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-epmp-gpsSync if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'1 - GPS Sync Up 2 - GPS Sync Down 3 - CMM Sync \\n'"; $rrd_options .= ' DEF:gpsSync='.$rrdfilename.':gpsSync:AVERAGE '; + $rrd_options .= " -l 1 "; + $rrd_options .= " -u 3 "; $rrd_options .= " LINE2:gpsSync#666699:'GPS Sync Status ' "; $rrd_options .= ' GPRINT:gpsSync:LAST:%0.2lf%s '; - } \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php b/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php index 7ee964ee5..fd12c5129 100644 --- a/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php +++ b/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php @@ -15,7 +15,8 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'Value Now Ave Max \\n'"; $rrd_options .= ' DEF:regSM='.$rrdfilename.':regSM:AVERAGE '; $rrd_options .= " LINE2:regSM#73b0c2:'Registered SM ' "; + $rrd_options .= " -l 0 "; $rrd_options .= ' GPRINT:regSM:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:regSM:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:regSM:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php b/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php index 4f0f9407c..a00d70ce5 100644 --- a/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php +++ b/html/includes/graphs/device/canopy_generic_whispGPSStats.inc.php @@ -13,6 +13,8 @@ $rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-whisp if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'Value 1 = Synched 2 = Lost Sync 3 = Generating \\n'"; $rrd_options .= ' DEF:whispGPSStats='.$rrdfilename.':whispGPSStats:AVERAGE '; + $rrd_options .= " -l 1 "; + $rrd_options .= " -u 3 "; $rrd_options .= " LINE2:whispGPSStats#00B8E6:'GPS Status ' "; $rrd_options .= ' GPRINT:whispGPSStats:LAST:%0.2lf%s\\\l '; } \ No newline at end of file From 499a23e372f23de81f843f0fea36232a430e0d94 Mon Sep 17 00:00:00 2001 From: Paul Heinrichs Date: Wed, 6 Apr 2016 08:20:10 -0400 Subject: [PATCH 3/5] Adjusted canopy sensor high/low limits --- includes/discovery/functions.inc.php | 7 ++----- includes/discovery/sensors/temperatures/canopy.inc.php | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index b622454ba..e93099f86 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -338,10 +338,7 @@ function sensor_low_limit($class, $current) { break; case 'signal': - $limit = ($current * 1.20); - if ($limit < -80 && $current > -80) { - $limit = -80; - } + $limit = -80; break; }//end switch @@ -387,7 +384,7 @@ function sensor_limit($class, $current) { break; case 'signal'; - $limit = 0; + $limit = -30; break; }//end switch diff --git a/includes/discovery/sensors/temperatures/canopy.inc.php b/includes/discovery/sensors/temperatures/canopy.inc.php index a268c52da..7acf089c7 100644 --- a/includes/discovery/sensors/temperatures/canopy.inc.php +++ b/includes/discovery/sensors/temperatures/canopy.inc.php @@ -15,7 +15,6 @@ if ($device['os'] == 'canopy') { list(,$current) = explode(' ', $oids); $index = $oid; $descr = 'System Temp'; - discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, '1', -30, null, null, 50, $current); } - -} +} \ No newline at end of file From f60228b8000fb994db0fb65ed13abc1c167f800b Mon Sep 17 00:00:00 2001 From: Paul Heinrichs Date: Wed, 6 Apr 2016 08:21:42 -0400 Subject: [PATCH 4/5] Add unit_long variable to signal sensor --- html/includes/graphs/device/signal.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/graphs/device/signal.inc.php b/html/includes/graphs/device/signal.inc.php index 5bf416ee1..d5758492e 100644 --- a/html/includes/graphs/device/signal.inc.php +++ b/html/includes/graphs/device/signal.inc.php @@ -2,6 +2,6 @@ $class = 'signal'; $unit = 'dBm'; - $unit_long = ''; + $unit_long = 'dBm'; require 'includes/graphs/device/sensor.inc.php'; \ No newline at end of file From f17a1baabb3c683e50d3854f048ad1c38e7c6a20 Mon Sep 17 00:00:00 2001 From: Paul Heinrichs Date: Wed, 6 Apr 2016 08:48:20 -0400 Subject: [PATCH 5/5] Removing leading whitespace in signal.inc --- html/includes/graphs/device/signal.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/html/includes/graphs/device/signal.inc.php b/html/includes/graphs/device/signal.inc.php index d5758492e..f8f4769d0 100644 --- a/html/includes/graphs/device/signal.inc.php +++ b/html/includes/graphs/device/signal.inc.php @@ -1,7 +1,7 @@ -