Split Cambium/Canopy Detection and Polling

This commit is contained in:
Paul Heinrichs 2016-03-24 10:34:56 -04:00
parent 0a2b1154f0
commit 985e1a4402
31 changed files with 994 additions and 162 deletions

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-450-linkRadioDbm.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:vertical='.$rrdfilename.':vertical:AVERAGE ';
$rrd_options .= ' DEF:horizontal='.$rrdfilename.':horizontal:AVERAGE ';
$rrd_options .= " LINE2:vertical#FF0000:'Vertical ' ";
$rrd_options .= ' GPRINT:vertical:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:horizontal#003EFF:'Horizontal ' ";
$rrd_options .= ' GPRINT:horizontal:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,21 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-450-masterSSR.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:ssr='.$rrdfilename.':ssr:AVERAGE ';
$rrd_options .= " LINE2:ssr#9B30FF:'Signal Strength Ratio ' ";
$rrd_options .= ' GPRINT:ssr:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:ssr:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:ssr:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,21 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-450-powerlevel.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:last='.$rrdfilename.':last:AVERAGE ';
$rrd_options .= " LINE2:last#003EFF:'Last ' ";
$rrd_options .= ' GPRINT:last:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:last:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:last:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-450-ptpSNR.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:vertical='.$rrdfilename.':vertical:AVERAGE ';
$rrd_options .= ' DEF:horizontal='.$rrdfilename.':horizontal:AVERAGE ';
$rrd_options .= " LINE2:vertical#FF0000:'Vertical ' ";
$rrd_options .= ' GPRINT:vertical:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:horizontal#00B2EE:'Horizontal ' ";
$rrd_options .= ' GPRINT:horizontal:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-450-slaveHV.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:vertical='.$rrdfilename.':vertical:AVERAGE ';
$rrd_options .= ' DEF:horizontal='.$rrdfilename.':horizontal:AVERAGE ';
$rrd_options .= " LINE2:vertical#FF0000:'Vertical ' ";
$rrd_options .= ' GPRINT:vertical:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:horizontal#003EFF:'Horizontal ' ";
$rrd_options .= ' GPRINT:horizontal:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-450-slaveSNR.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:vertical='.$rrdfilename.':vertical:AVERAGE ';
$rrd_options .= ' DEF:horizontal='.$rrdfilename.':horizontal:AVERAGE ';
$rrd_options .= " LINE2:vertical#FF0000:'Vertical ' ";
$rrd_options .= ' GPRINT:vertical:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:horizontal#00B2EE:'Horizontal ' ";
$rrd_options .= ' GPRINT:horizontal:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,21 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-450-slaveSSR.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:ssr='.$rrdfilename.':ssr:AVERAGE ';
$rrd_options .= " LINE2:ssr#9B30FF:'Signal Strength Ratio ' ";
$rrd_options .= ' GPRINT:ssr:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:ssr:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:ssr:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,22 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-crcErrors.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:crcErrors='.$rrdfilename.':crcErrors:AVERAGE ';
$rrd_options .= " LINE2:crcErrors#FF0000:'CRC Errors ' ";
$rrd_options .= ' GPRINT:crcErrors:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:crcErrors:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:crcErrors:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-errorCount.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:fecInErrorsCount='.$rrdfilename.':fecInErrorsCount:AVERAGE ';
$rrd_options .= ' DEF:fecOutErrorsCount='.$rrdfilename.':fecOutErrorsCount:AVERAGE ';
$rrd_options .= " LINE2:fecInErrorsCount#FF0000:'In Error Count ' ";
$rrd_options .= ' GPRINT:fecInErrorsCount:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:fecInErrorsCount:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:fecInErrorsCount:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:fecOutErrorsCount#00FF00:'Out Error Count ' ";
$rrd_options .= ' GPRINT:fecOutErrorsCount:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:fecOutErrorsCount:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:fecOutErrorsCount:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,18 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-freq.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'Ghz Now \\n'";
$rrd_options .= ' DEF:freq='.$rrdfilename.':freq:AVERAGE ';
$rrd_options .= " LINE2:freq#FF0000:'Frequency ' ";
$rrd_options .= ' GPRINT:freq:LAST:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-gpsStats.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'Amount Now Ave Max \\n'";
$rrd_options .= ' DEF:visible='.$rrdfilename.':visible:AVERAGE ';
$rrd_options .= ' DEF:tracked='.$rrdfilename.':tracked:AVERAGE ';
$rrd_options .= " LINE2:visible#0099ff:'Visible ' ";
$rrd_options .= ' GPRINT:visible:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:visible:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:visible:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:tracked#cc9900:'Tracked ' ";
$rrd_options .= ' GPRINT:tracked:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:tracked:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:tracked:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,21 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-jitter.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:' Now Ave Max \\n'";
$rrd_options .= ' DEF:jitter='.$rrdfilename.':jitter:AVERAGE ';
$rrd_options .= " AREA:jitter#3333cc:'Jitter ' ";
$rrd_options .= ' GPRINT:jitter:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:jitter:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:jitter:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,36 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-radioDbm.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:dbm='.$rrdfilename.':dbm:AVERAGE ';
$rrd_options .= ' DEF:min='.$rrdfilename.':min:AVERAGE ';
$rrd_options .= ' DEF:max='.$rrdfilename.':max:AVERAGE ';
$rrd_options .= ' DEF:avg='.$rrdfilename.':avg:AVERAGE ';
$rrd_options .= " LINE2:dbm#00E5EE:'Radio Dbm ' ";
$rrd_options .= ' GPRINT:dbm:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:dbm:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:dbm:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:min#00CD66:'Min ' ";
$rrd_options .= ' GPRINT:min:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:min:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:min:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:max#B272A6:'Max ' ";
$rrd_options .= ' GPRINT:max:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:max:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:max:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:avg#CC7F32:'Avg ' ";
$rrd_options .= ' GPRINT:avg:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:avg:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:avg:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-regCount.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:regCount='.$rrdfilename.':regCount:AVERAGE ';
$rrd_options .= ' DEF:failed='.$rrdfilename.':failed:AVERAGE ';
$rrd_options .= " AREA:regCount#FF0000:'Registered Sm ' ";
$rrd_options .= ' GPRINT:regCount:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:regCount:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:regCount:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:failed#000000:'Amount Failed ' ";
$rrd_options .= ' GPRINT:failed:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:failed:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:failed:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,21 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-rssi.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:rssi='.$rrdfilename.':rssi:AVERAGE ';
$rrd_options .= " AREA:rssi#FF0000:'RSSI ' ";
$rrd_options .= ' GPRINT:rssi:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:rssi:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:rssi:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,31 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-signalHV.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:vertical='.$rrdfilename.':vertical:AVERAGE ';
$rrd_options .= ' DEF:horizontal='.$rrdfilename.':horizontal:AVERAGE ';
$rrd_options .= ' DEF:combined='.$rrdfilename.':combined:AVERAGE ';
$rrd_options .= " LINE2:vertical#FF0000:'Vertical ' ";
$rrd_options .= ' GPRINT:vertical:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:horizontal#003EFF:'Horizontal ' ";
$rrd_options .= ' GPRINT:horizontal:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:combined#FFA500:'Combined ' ";
$rrd_options .= ' GPRINT:combined:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:combined:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:combined:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,26 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-snrHV.rrd';
if (file_exists($rrdfilename)) {
$rrd_options .= " COMMENT:'dBm Now Ave Max \\n'";
$rrd_options .= ' DEF:vertical='.$rrdfilename.':vertical:AVERAGE ';
$rrd_options .= ' DEF:horizontal='.$rrdfilename.':horizontal:AVERAGE ';
$rrd_options .= " LINE2:vertical#FF0000:'Vertical ' ";
$rrd_options .= ' GPRINT:vertical:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:vertical:MAX:%0.2lf%s\\\l ';
$rrd_options .= " LINE2:horizontal#003EFF:'Horizontal ' ";
$rrd_options .= ' GPRINT:horizontal:LAST:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MIN:%0.2lf%s ';
$rrd_options .= ' GPRINT:horizontal:MAX:%0.2lf%s\\\l ';
}

View File

@ -0,0 +1,18 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/canopy-generic-whispGPSStats.rrd';
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 .= " LINE2:whispGPSStats#00B8E6:'GPS Status ' ";
$rrd_options .= ' GPRINT:whispGPSStats:LAST:%0.2lf%s\\\l ';
}

View File

@ -1370,6 +1370,13 @@ $config['os'][$os]['icon'] = 'cambium';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$os = 'canopy';
$config['os'][$os]['text'] = 'Canopy';
$config['os'][$os]['type'] = 'wireless';
$config['os'][$os]['icon'] = 'cambium';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$os = 'datacom';
$config['os'][$os]['text'] = 'Datacom';
$config['os'][$os]['type'] = 'network';
@ -1753,57 +1760,57 @@ $config['graph_types']['device']['cambium_250_ssr']['section'] = 'wireless';
$config['graph_types']['device']['cambium_250_ssr']['order'] = '4';
$config['graph_types']['device']['cambium_250_ssr']['descr'] = 'Signal Strength Ratio';
$config['graph_types']['device']['cambium_generic_whispGPSStats']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_whispGPSStats']['order'] = '0';
$config['graph_types']['device']['cambium_generic_whispGPSStats']['descr'] = 'GPS Status';
$config['graph_types']['device']['cambium_generic_gpsStats']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_gpsStats']['order'] = '0';
$config['graph_types']['device']['cambium_generic_gpsStats']['descr'] = 'GPS Stats';
$config['graph_types']['device']['cambium_generic_rssi']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_rssi']['order'] = '1';
$config['graph_types']['device']['cambium_generic_rssi']['descr'] = 'Signal Rssi';
$config['graph_types']['device']['cambium_generic_jitter']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_jitter']['order'] = '2';
$config['graph_types']['device']['cambium_generic_jitter']['descr'] = 'Jitter';
$config['graph_types']['device']['cambium_generic_signalHV']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_signalHV']['order'] = '3';
$config['graph_types']['device']['cambium_generic_signalHV']['descr'] = 'Signal';
$config['graph_types']['device']['cambium_generic_450_powerlevel']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_450_powerlevel']['order'] = '4';
$config['graph_types']['device']['cambium_generic_450_powerlevel']['descr'] = 'Power Level of Registered SM';
$config['graph_types']['device']['cambium_generic_450_linkRadioDbm']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_450_linkRadioDbm']['order'] = '5';
$config['graph_types']['device']['cambium_generic_450_linkRadioDbm']['descr'] = 'Radio Link H/V';
$config['graph_types']['device']['cambium_generic_450_ptpSNR']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_450_ptpSNR']['order'] = '6';
$config['graph_types']['device']['cambium_generic_450_ptpSNR']['descr'] = 'Master SNR';
$config['graph_types']['device']['cambium_generic_450_slaveHV']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_450_slaveHV']['order'] = '7';
$config['graph_types']['device']['cambium_generic_450_slaveHV']['descr'] = 'Dbm H/V';
$config['graph_types']['device']['cambium_generic_450_slaveSNR']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_450_slaveSNR']['order'] = '8';
$config['graph_types']['device']['cambium_generic_450_slaveSNR']['descr'] = 'SNR';
$config['graph_types']['device']['cambium_generic_450_slaveSSR']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_450_slaveSSR']['order'] = '9';
$config['graph_types']['device']['cambium_generic_450_slaveSSR']['descr'] = 'SSR';
$config['graph_types']['device']['cambium_generic_450_masterSSR']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_450_masterSSR']['order'] = '10';
$config['graph_types']['device']['cambium_generic_450_masterSSR']['descr'] = 'Master SSR';
$config['graph_types']['device']['cambium_generic_regCount']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_regCount']['order'] = '11';
$config['graph_types']['device']['cambium_generic_regCount']['descr'] = 'Registered SM';
$config['graph_types']['device']['cambium_generic_freq']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_freq']['order'] = '12';
$config['graph_types']['device']['cambium_generic_freq']['descr'] = 'Radio Frequency';
$config['graph_types']['device']['cambium_generic_radioDbm']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_radioDbm']['order'] = '13';
$config['graph_types']['device']['cambium_generic_radioDbm']['descr'] = 'Radio Dbm';
$config['graph_types']['device']['cambium_generic_errorCount']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_errorCount']['order'] = '14';
$config['graph_types']['device']['cambium_generic_errorCount']['descr'] = 'Error Count';
$config['graph_types']['device']['cambium_generic_crcErrors']['section'] = 'wireless';
$config['graph_types']['device']['cambium_generic_crcErrors']['order'] = '15';
$config['graph_types']['device']['cambium_generic_crcErrors']['descr'] = 'CRC Errors';
$config['graph_types']['device']['canopy_generic_whispGPSStats']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_whispGPSStats']['order'] = '0';
$config['graph_types']['device']['canopy_generic_whispGPSStats']['descr'] = 'GPS Status';
$config['graph_types']['device']['canopy_generic_gpsStats']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_gpsStats']['order'] = '0';
$config['graph_types']['device']['canopy_generic_gpsStats']['descr'] = 'GPS Stats';
$config['graph_types']['device']['canopy_generic_rssi']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_rssi']['order'] = '1';
$config['graph_types']['device']['canopy_generic_rssi']['descr'] = 'Signal Rssi';
$config['graph_types']['device']['canopy_generic_jitter']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_jitter']['order'] = '2';
$config['graph_types']['device']['canopy_generic_jitter']['descr'] = 'Jitter';
$config['graph_types']['device']['canopy_generic_signalHV']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_signalHV']['order'] = '3';
$config['graph_types']['device']['canopy_generic_signalHV']['descr'] = 'Signal';
$config['graph_types']['device']['canopy_generic_450_powerlevel']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_450_powerlevel']['order'] = '4';
$config['graph_types']['device']['canopy_generic_450_powerlevel']['descr'] = 'Power Level of Registered SM';
$config['graph_types']['device']['canopy_generic_450_linkRadioDbm']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_450_linkRadioDbm']['order'] = '5';
$config['graph_types']['device']['canopy_generic_450_linkRadioDbm']['descr'] = 'Radio Link H/V';
$config['graph_types']['device']['canopy_generic_450_ptpSNR']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_450_ptpSNR']['order'] = '6';
$config['graph_types']['device']['canopy_generic_450_ptpSNR']['descr'] = 'Master SNR';
$config['graph_types']['device']['canopy_generic_450_slaveHV']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_450_slaveHV']['order'] = '7';
$config['graph_types']['device']['canopy_generic_450_slaveHV']['descr'] = 'Dbm H/V';
$config['graph_types']['device']['canopy_generic_450_slaveSNR']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_450_slaveSNR']['order'] = '8';
$config['graph_types']['device']['canopy_generic_450_slaveSNR']['descr'] = 'SNR';
$config['graph_types']['device']['canopy_generic_450_slaveSSR']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_450_slaveSSR']['order'] = '9';
$config['graph_types']['device']['canopy_generic_450_slaveSSR']['descr'] = 'SSR';
$config['graph_types']['device']['canopy_generic_450_masterSSR']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_450_masterSSR']['order'] = '10';
$config['graph_types']['device']['canopy_generic_450_masterSSR']['descr'] = 'Master SSR';
$config['graph_types']['device']['canopy_generic_regCount']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_regCount']['order'] = '11';
$config['graph_types']['device']['canopy_generic_regCount']['descr'] = 'Registered SM';
$config['graph_types']['device']['canopy_generic_freq']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_freq']['order'] = '12';
$config['graph_types']['device']['canopy_generic_freq']['descr'] = 'Radio Frequency';
$config['graph_types']['device']['canopy_generic_radioDbm']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_radioDbm']['order'] = '13';
$config['graph_types']['device']['canopy_generic_radioDbm']['descr'] = 'Radio Dbm';
$config['graph_types']['device']['canopy_generic_errorCount']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_errorCount']['order'] = '14';
$config['graph_types']['device']['canopy_generic_errorCount']['descr'] = 'Error Count';
$config['graph_types']['device']['canopy_generic_crcErrors']['section'] = 'wireless';
$config['graph_types']['device']['canopy_generic_crcErrors']['order'] = '15';
$config['graph_types']['device']['canopy_generic_crcErrors']['descr'] = 'CRC Errors';
$config['graph_types']['device']['cambium_epmp_RFStatus']['section'] = 'wireless';
$config['graph_types']['device']['cambium_epmp_RFStatus']['order'] = '0';

View File

@ -19,12 +19,6 @@ if (!$os) {
else if (preg_match('/^Cambium/', $sysDescr)) {
$os = 'cambium';
}
else if (preg_match('/^CANOPY/', $sysDescr)) {
$os = 'cambium';
}
else if (preg_match('/^CMM/', $sysDescr)) {
$os = 'cambium';
}
else if (strstr($sysObjectId, '.1.3.6.1.4.1.17713.21')) {
$os = 'cambium';
}

View File

@ -0,0 +1,19 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (!$os) {
if (preg_match('/^CANOPY/', $sysDescr)) {
$os = 'canopy';
}
else if (preg_match('/^CMM/', $sysDescr)) {
$os = 'canopy';
}
}

View File

@ -9,28 +9,6 @@ if ($device['os'] == 'cambium') {
$oid = 'receivePower.0';
$divisor = 10;
}
else if (strstr($cambium_type, 'BHUL450')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$oid = 'lastPowerLevel.2';
$mib = 'WHISP-APS-MIB';
}
else {
$oid = 'radioDbmInt.0';
$mib = 'WHISP-SM-MIB';
}
}
else if (strstr($cambium_type, 'BHUL') || strstr($cambium_type, 'BH')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$oid = 'lastPowerLevel.2';
$mib = 'WHISP-APS-MIB';
}
else {
$oid = '1.3.6.1.4.1.161.19.3.2.2.21.0';
$mib = 'WHISP-BOX-MIBV2-MIB';
}
}
else if (strstr($cambium_type, 'PTP250')) {
$oid = 'receivePower.0';
$mib = 'CAMBIUM-PTP250-MIB';

View File

@ -0,0 +1,48 @@
<?php
if ($device['os'] == 'canopy') {
$cambium_type = snmp_get($device, 'sysDescr.0', '-Oqv', '');
$divisor = 1;
if (strstr($cambium_type, 'BHUL450')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$oid = 'lastPowerLevel.2';
$mib = 'WHISP-APS-MIB';
}
else {
$oid = 'radioDbmInt.0';
$mib = 'WHISP-SM-MIB';
}
}
else if (strstr($cambium_type, 'BHUL') || strstr($cambium_type, 'BH')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$oid = 'lastPowerLevel.2';
$mib = 'WHISP-APS-MIB';
}
else {
$oid = '1.3.6.1.4.1.161.19.3.2.2.21.0';
$mib = 'WHISP-BOX-MIBV2-MIB';
}
}
else {
$oid = '1.3.6.1.4.1.161.19.3.2.2.21.0';
$mib = 'WHISP-BOX-MIBV2-MIB';
}
$oids = trim(str_replace('"', '', snmp_get($device, "$oid", '-OsqnU', $mib)));
d_echo($oids."\n");
if (!empty($oids)) {
echo 'Canopy Signal ';
}
$type = 'canopy';
if (!empty($oids)) {
list(,$current) = explode(' ', $oids);
$current = $current / $divisor;
$index = $oid;
$descr = 'Signal';
discover_sensor($valid['sensor'], 'signal', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current);
}
}

View File

@ -0,0 +1,21 @@
<?php
if ($device['os'] == 'canopy') {
$oid = 'boxTemperatureC.0';
$oids = trim(str_replace('"', '', snmp_get($device, "$oid", '-OsqnU', 'WHISP-BOX-MIBV2-MIB')));
d_echo($oids."\n");
if (!empty($oids)) {
echo 'Cambium Temperature ';
}
$divisor = 1;
$type = 'cambium';
if (!empty($oids)) {
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);
}
}

View File

@ -20,8 +20,8 @@ function poll_sensor($device, $class, $unit) {
if ($device['os'] == 'netapp') {
include 'includes/polling/temperatures/netapp.inc.php';
}
else if ($device['os'] == 'cambium') {
include 'includes/polling/temperatures/cambium.inc.php';
else if ($device['os'] == 'canopy') {
include 'includes/polling/temperatures/canopy.inc.php';
}
else {
// Try 5 times to get a valid temp reading

View File

@ -11,40 +11,17 @@
$cambium_type = snmp_get($device, 'sysDescr.0', '-Oqv', '');
$is_epmp = snmp_get($device, 'sysObjectID.0', '-Oqv', '');
$PMP = snmp_get($device, 'boxDeviceType.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
$version = $cambium_type;
$filtered_words = array(
'timing',
'timeing',
);
if (strstr($cambium_type, 'Cambium PTP 50650')) {
$masterSlaveMode = ucfirst(snmp_get($device, 'masterSlaveMode.0', '-Oqv', "CAMBIUM-PTP650-MIB"));
$hardware = 'PTP 650 '. $masterSlaveMode;
include 'includes/polling/wireless/cambium-650.inc.php';
}
else if (strstr($cambium_type, 'BHUL450')) {
$masterSlaveMode = str_replace($filtered_words,"",snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'));
$hardware = 'PTP 450 '.$masterSlaveMode;
$version = snmp_get($device, 'boxDeviceTypeID.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
include 'includes/polling/wireless/cambium-generic.inc.php';
}
else if (strstr($cambium_type, 'PTP250')) {
$masterSlaveMode = ucfirst(snmp_get($device, 'masterSlaveMode.0', '-Oqv', "CAMBIUM-PTP250-MIB"));
$hardware = 'PTP 250 '.$masterSlaveMode;
include 'includes/polling/wireless/cambium-250.inc.php';
}
else if (strstr($cambium_type, 'BHUL')) {
$masterSlaveMode = str_replace($filtered_words,"",snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'));
$hardware = 'PTP 230 '. $masterSlaveMode;
$version = snmp_get($device, 'boxDeviceTypeID.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
include 'includes/polling/wireless/cambium-generic.inc.php';
}
else if (strstr($cambium_type, 'BH20') || strstr($cambium_type, 'BH10')) {
$masterSlaveMode = str_replace($filtered_words,"",snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'));
$hardware = 'PTP 100 '. $masterSlaveMode;
$version = snmp_get($device, 'boxDeviceTypeID.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
include 'includes/polling/wireless/cambium-generic.inc.php';
}
else if (strstr($is_epmp, '.17713.21')) {
$epmp_ap = snmp_get($device, 'wirelessInterfaceMode.0', '-Oqv', 'CAMBIUM-PMP80211-MIB');
$epmp_number = snmp_get($device, 'cambiumSubModeType.0', '-Oqv', 'CAMBIUM-PMP80211-MIB');
@ -66,44 +43,4 @@ else if (strstr($is_epmp, '.17713.21')) {
}
$version = snmp_get($device, 'cambiumCurrentuImageVersion.0', '-Oqv', 'CAMBIUM-PMP80211-MIB');
include 'includes/polling/wireless/cambium-epmp.inc.php';
}
else if (strstr($cambium_type, 'CMM')) {
$hardware = 'CMM';
include 'includes/polling/wireless/cambium-generic.inc.php';
}
else if (strstr($PMP, 'MIMO OFDM')) {
if (strstr($version, "AP")) {
$hardware = 'PMP 450 AP';
}
else if (strstr($version, "SM")) {
$hardware = 'PMP 450 SM';
}
else {
$hardware = 'PMP 450';
}
include 'includes/polling/wireless/cambium-generic.inc.php';
}
else if (strstr($PMP, 'OFDM')) {
if (strstr($version, "AP")) {
$hardware = 'PMP 430 AP';
}
else if (strstr($version, "SM")) {
$hardware = 'PMP 430 SM';
}
else {
$hardware = 'PMP 430';
}
include 'includes/polling/wireless/cambium-generic.inc.php';
}
else {
if (strstr($version, "AP")) {
$hardware = 'PMP 100 AP';
}
else if (strstr($version, "SM")) {
$hardware = 'PMP 100 SM';
}
else {
$hardware = 'PMP 100';
}
include 'includes/polling/wireless/cambium-generic.inc.php';
}

View File

@ -0,0 +1,76 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$cambium_type = snmp_get($device, 'sysDescr.0', '-Oqv', '');
$PMP = snmp_get($device, 'boxDeviceType.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
$version = $cambium_type;
$filtered_words = array(
'timing',
'timeing',
);
if (strstr($cambium_type, 'BHUL450')) {
$masterSlaveMode = str_replace($filtered_words,"",snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'));
$hardware = 'PTP 450 '.$masterSlaveMode;
$version = snmp_get($device, 'boxDeviceTypeID.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
include 'includes/polling/wireless/canopy-generic.inc.php';
}
else if (strstr($cambium_type, 'BHUL')) {
$masterSlaveMode = str_replace($filtered_words,"",snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'));
$hardware = 'PTP 230 '. $masterSlaveMode;
$version = snmp_get($device, 'boxDeviceTypeID.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
include 'includes/polling/wireless/canopy-generic.inc.php';
}
else if (strstr($cambium_type, 'BH20') || strstr($cambium_type, 'BH10')) {
$masterSlaveMode = str_replace($filtered_words,"",snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'));
$hardware = 'PTP 100 '. $masterSlaveMode;
$version = snmp_get($device, 'boxDeviceTypeID.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
include 'includes/polling/wireless/canopy-generic.inc.php';
}
else if (strstr($cambium_type, 'CMM')) {
$hardware = 'CMM';
include 'includes/polling/wireless/canopy-generic.inc.php';
}
else if (strstr($PMP, 'MIMO OFDM')) {
if (strstr($version, "AP")) {
$hardware = 'PMP 450 AP';
}
else if (strstr($version, "SM")) {
$hardware = 'PMP 450 SM';
}
else {
$hardware = 'PMP 450';
}
include 'includes/polling/wireless/canopy-generic.inc.php';
}
else if (strstr($PMP, 'OFDM')) {
if (strstr($version, "AP")) {
$hardware = 'PMP 430 AP';
}
else if (strstr($version, "SM")) {
$hardware = 'PMP 430 SM';
}
else {
$hardware = 'PMP 430';
}
include 'includes/polling/wireless/canopy-generic.inc.php';
}
else {
if (strstr($version, "AP")) {
$hardware = 'PMP 100 AP';
}
else if (strstr($version, "SM")) {
$hardware = 'PMP 100 SM';
}
else {
$hardware = 'PMP 100';
}
include 'includes/polling/wireless/canopy-generic.inc.php';
}

View File

@ -13,27 +13,9 @@ $is_epmp = snmp_get($device, 'sysObjectID.0', '-Oqv', '');
if (strstr($cambium_type, 'Cambium PTP 50650')) {
$mib = ':CAMBIUM-PTP650-MIB';
}
else if (strstr($cambium_type, 'BHUL450-DES') || stristr($cambium_type, 'BHUL450-AES')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$mib = ':WHISP-APS-MIB';
}
else {
$mib = ':WHISP-SM-MIB';
}
}
else if (strstr($cambium_type, 'PTP250')) {
$mib = ':CAMBIUM-PTP250-MIB';
}
else if (strstr($cambium_type, 'BHUL') || stristr($cambium_type, 'BH')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$mib = ':WHISP-APS-MIB';
}
else {
$mib = ':WHISP-BOX-MIBV2-MIB';
}
}
else if (strstr($is_epmp, '.17713.21')) {
$epmp_ap = snmp_get($device, 'wirelessInterfaceMode.0', '-Oqv', 'CAMBIUM-PMP80211-MIB');
$epmp_number = snmp_get($device, 'cambiumSubModeType.0', '-Oqv', 'CAMBIUM-PMP80211-MIB');

View File

@ -0,0 +1,32 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$cambium_type = snmp_get($device, 'sysDescr.0', '-Oqv', '');
if (strstr($cambium_type, 'BHUL450-DES') || stristr($cambium_type, 'BHUL450-AES')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$mib = ':WHISP-APS-MIB';
}
else {
$mib = ':WHISP-SM-MIB';
}
}
else if (strstr($cambium_type, 'BHUL') || stristr($cambium_type, 'BH')) {
$masterSlaveMode = snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
if ($masterSlaveMode == "timingMaster") {
$mib = ':WHISP-APS-MIB';
}
else {
$mib = ':WHISP-BOX-MIBV2-MIB';
}
}
else {
$mib = ':WHISP-BOX-MIBV2-MIB';
}

View File

@ -0,0 +1,3 @@
<?php
$sensor_value = trim(str_replace('"', '', snmp_get($device, $sensor['sensor_oid'], '-OUqnv', "SNMPv2-MIB:WHISP-BOX-MIBV2-MIB")));

View File

@ -0,0 +1,297 @@
<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (strstr($hardware, 'CMM') == false) {
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-errorCount.rrd";
$fecInErrorsCount = snmp_get($device, "fecInErrorsCount.0", "-Ovqn", "WHISP-BOX-MIBV2-MIB");
$fecOutErrorsCount = snmp_get($device, "fecOutErrorsCount.0", "-Ovqn", "WHISP-BOX-MIBV2-MIB");
if (is_numeric($fecInErrorsCount) && is_numeric($fecOutErrorsCount)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:fecInErrorsCount:GAUGE:600:0:100000 DS:fecOutErrorsCount:GAUGE:600:0:100000".$config['rrd_rra']);
}
$fields = array(
'fecInErrorsCount' => $fecInErrorsCount,
'fecOutErrorsCount' => $fecOutErrorsCount,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_errorCount'] = TRUE;
unset($rrd_filename,$fecInErrorsCount,$fecOutErrorsCount);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-crcErrors.rrd";
$crcErrors = snmp_get($device, "fecCRCError.0", "-Ovqn", "WHISP-BOX-MIBV2-MIB");
if (is_numeric($crcErrors)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:crcErrors:GAUGE:600:0:100000".$config['rrd_rra']);
}
$fields = array(
'crcErrors' => $crcErrors,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_crcErrors'] = TRUE;
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-signalHV.rrd";
$vertical = str_replace('"',"",snmp_get($device, ".1.3.6.1.4.1.161.19.3.2.2.117.0", "-Ovqn", ""));
$horizontal = str_replace('"',"",snmp_get($device, ".1.3.6.1.4.1.161.19.3.2.2.118.0", "-Ovqn", ""));
$combined = snmp_get($device, "1.3.6.1.4.1.161.19.3.2.2.21.0", "-Ovqn", "");
if (is_numeric($vertical) && is_numeric($horizontal) && is_numeric($combined)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:vertical:GAUGE:600:-150:0 DS:horizontal:GAUGE:600:-150:0 DS:combined:GAUGE:600:-150:0".$config['rrd_rra']);
}
$fields = array(
'vertical' => floatval($vertical),
'horizontal' => floatval($horizontal),
'combined' => $combined,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_signalHV'] = TRUE;
unset($rrd_filename,$vertical,$horizontal,$combined);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-rssi.rrd";
$rssi = snmp_get($device, "1.3.6.1.4.1.161.19.3.2.2.2.0", "-Ovqn", "");
if (is_numeric($rssi)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:rssi:GAUGE:600:0:5000".$config['rrd_rra']);
}
$fields = array(
'rssi' => $rssi,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_rssi'] = TRUE;
unset($rrd_filename,$rssi);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-jitter.rrd";
$jitter = snmp_get($device, "jitter.0", "-Ovqn", "WHISP-SM-MIB");
if (is_numeric($jitter)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:jitter:GAUGE:600:0:20".$config['rrd_rra']);
}
$fields = array(
'jitter' => $jitter,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_jitter'] = TRUE;
unset($rrd_filename,$jitter);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-450-slaveHV.rrd";
$horizontal = str_replace('"',"",snmp_get($device, "radioDbmHorizontal.0", "-Ovqn", "WHISP-SM-MIB"));
$vertical = str_replace('"',"",snmp_get($device, "radioDbmVertical.0", "-Ovqn", "WHISP-SM-MIB"));
if (is_numeric($horizontal) && is_numeric($vertical)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:horizontal:GAUGE:600:-100:100 DS:vertical:GAUGE:600:-100:100".$config['rrd_rra']);
}
$fields = array(
'horizontal' => $horizontal,
'vertical' => $vertical,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_450_slaveHV'] = TRUE;
unset($rrd_filename,$horizontal,$vertical);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-450-slaveSSR.rrd";
$ssr = str_replace('"',"",snmp_get($device, "signalStrengthRatio.0", "-Ovqn", "WHISP-SM-MIB"));
if (is_numeric($ssr)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:ssr:GAUGE:600:-150:150".$config['rrd_rra']);
}
$fields = array(
'ssr' => $ssr,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_450_slaveSSR'] = TRUE;
unset($rrd_filename,$ssr);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-450-slaveSNR.rrd";
$horizontal = str_replace('"',"",snmp_get($device, "signalToNoiseRatioSMHorizontal.0", "-Ovqn", "WHISP-SM-MIB"));
$vertical = str_replace('"',"",snmp_get($device, "signalToNoiseRatioSMVertical.0", "-Ovqn", "WHISP-SM-MIB"));
if (is_numeric($horizontal) && is_numeric($vertical)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:horizontal:GAUGE:600:0:100 DS:vertical:GAUGE:600:0:100".$config['rrd_rra']);
}
$fields = array(
'horizontal' => $horizontal,
'vertical' => $vertical,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_450_slaveSNR'] = TRUE;
unset($rrd_filename,$horizontal,$vertical);
}
}
if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware, 'CMM')) {
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-whispGPSStats.rrd";
$gpsStatus = snmp_get($device, "whispGPSStats.0", "-Ovqn", "WHISP-APS-MIB");
if ($gpsStatus == 'generatingSync') {
$gpsStatus = 3;
}
else if ($gpsStatus == 'gpsLostSync') {
$gpsStatus = 2;
}
else if ($gpsStatus == 'gpsSynchronized') {
$gpsStatus = 1;
}
if (is_numeric($gpsStatus)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:whispGPSStats:GAUGE:600:0:4".$config['rrd_rra']);
}
$fields = array(
'whispGPSStats' => $gpsStatus,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_whispGPSStats'] = TRUE;
unset($rrd_filename,$gpsStatus);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-gpsStats.rrd";
$visible = str_replace('"',"",snmp_get($device, ".1.3.6.1.4.1.161.19.3.4.4.7.0", "-Ovqn", ""));
$tracked = str_replace('"',"",snmp_get($device, ".1.3.6.1.4.1.161.19.3.4.4.8.0", "-Ovqn", ""));
if (is_numeric($visible) && is_numeric($tracked)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:visible:GAUGE:600:0:1000 DS:tracked:GAUGE:600:0:1000".$config['rrd_rra']);
}
$fields = array(
'visible' => floatval($visible),
'tracked' => floatval($tracked),
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_gpsStats'] = TRUE;
unset($rrd_filename,$visible,$tracked);
}
}
//PTP Equipment
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-450-powerlevel.rrd";
$lastLevel = str_replace('"',"",snmp_get($device, "lastPowerLevel.2", "-Ovqn", "WHISP-APS-MIB"));
if (is_numeric($lastLevel)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:last:GAUGE:600:-100:0".$config['rrd_rra']);
}
$fields = array(
'last' => $lastLevel,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_450_powerlevel'] = TRUE;
unset($lastLevel);
}
if (strstr($version, 'AP') == false) {
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-450-linkRadioDbm.rrd";
$horizontal = str_replace('"',"",snmp_get($device, "linkRadioDbmHorizontal.2", "-Ovqn", "WHISP-APS-MIB"));
$vertical = str_replace('"',"",snmp_get($device, "linkRadioDbmVertical.2", "-Ovqn", "WHISP-APS-MIB"));
if (is_numeric($horizontal) && is_numeric($vertical)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:horizontal:GAUGE:600:-100:0 DS:vertical:GAUGE:600:-100:0".$config['rrd_rra']);
}
$fields = array(
'horizontal' => $horizontal,
'vertical' => $vertical,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_450_linkRadioDbm'] = TRUE;
unset($rrd_filename,$horizontal,$horizontal);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-450-ptpSNR.rrd";
$horizontal = str_replace('"',"",snmp_get($device, "signalToNoiseRatioHorizontal.2", "-Ovqn", "WHISP-APS-MIB"));
$vertical = str_replace('"',"",snmp_get($device, "signalToNoiseRatioVertical.2", "-Ovqn", "WHISP-APS-MIB"));
if (is_numeric($horizontal) && is_numeric($vertical)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:horizontal:GAUGE:600:0:100 DS:vertical:GAUGE:600:0:100".$config['rrd_rra']);
}
$fields = array(
'horizontal' => $horizontal,
'vertical' => $vertical,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_450_ptpSNR'] = TRUE;
unset($rrd_filename,$horizontal,$horizontal);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-450-masterSSR.rrd";
$ssr = str_replace('"',"",snmp_get($device, "linkSignalStrengthRatio.2", "-Ovqn", "WHISP-APS-MIB"));
if (is_numeric($ssr)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:ssr:GAUGE:600:-150:150".$config['rrd_rra']);
}
$fields = array(
'ssr' => $ssr,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_450_masterSSR'] = TRUE;
unset($rrd_filename,$ssr);
}
if (strstr($hardware, 'PTP 230')) {
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-radioDbm.rrd";
$dbmRadio = str_replace('"',"",snmp_get($device, "radioDbmInt.0", "-Ovqn", "WHISP-SM-MIB"));
$minRadio = str_replace('"',"",snmp_get($device, "minRadioDbm.0", "-Ovqn", "WHISP-SM-MIB"));
$maxRadio = str_replace('"',"",snmp_get($device, "maxRadioDbm.0", "-Ovqn", "WHISP-SM-MIB"));
$avgRadio = str_replace('"',"",snmp_get($device, "radioDbmAvg.0", "-Ovqn", "WHISP-SM-MIB"));
if (is_numeric($dbmRadio) && is_numeric($minRadio) && is_numeric($maxRadio) && is_numeric($avgRadio)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:dbm:GAUGE:600:-100:0 DS:min:GAUGE:600:-100:0 DS:max:GAUGE:600:-100:0 DS:avg:GAUGE:600:-100:0".$config['rrd_rra']);
}
$fields = array(
'dbm' => $dbmRadio,
'min' => $minRadio,
'max' => $maxRadio,
'avg' => $avgRadio,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_radioDbm'] = TRUE;
unset($rrd_filename,$dbmRadio,$minRadio,$maxRadio,$avgRadio);
}
}
}
//AP Equipment
if (strstr($version, 'AP')) {
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-regCount.rrd";
$registered = str_replace('"',"",snmp_get($device, "regCount.0", "-Ovqn", "WHISP-APS-MIB"));
$failed = str_replace('"',"",snmp_get($device, "regFailureCount.0", "-Ovqn", "WHISP-APS-MIB"));
if (is_numeric($registered) && is_numeric($failed)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:regCount:GAUGE:600:0:15000 DS:failed:GAUGE:600:0:15000".$config['rrd_rra']);
}
$fields = array(
'regCount' => $registered,
'failed' => $failed,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_regCount'] = TRUE;
unset($rrd_filename,$registered,$failed);
}
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/canopy-generic-freq.rrd";
$freq = str_replace('"',"",snmp_get($device, "currentRadioFreqCarrier.0", "-Ovqn", "WHISP-APS-MIB"));
if (is_numeric($freq)) {
if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:freq:GAUGE:600:0:100000".$config['rrd_rra']);
}
if ($freq > 99999) {
$freq = $freq / 100000;
}
else {
$freq = $freq / 10000;
}
$fields = array(
'freq' => $freq,
);
rrdtool_update($rrd_filename, $fields);
$graphs['canopy_generic_freq'] = TRUE;
unset($rrd_filename,$freq);
}
}