mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Merge pull request #3279 from pheinrichs/issue-3277
Added Cambium Support
This commit is contained in:
@@ -1363,13 +1363,20 @@ $config['os'][$os]['type'] = 'network';
|
||||
$config['os'][$os]['icon'] = 'hikvision';
|
||||
|
||||
// Canopy / Cambium support
|
||||
$os = 'canopy';
|
||||
$os = 'cambium';
|
||||
$config['os'][$os]['text'] = 'Cambium';
|
||||
$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 = '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';
|
||||
@@ -1717,6 +1724,116 @@ $config['graph_types']['device']['sub10_sub10RadioLclDataRate']['section'] = 'wi
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclDataRate']['order'] = '4';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclDataRate']['descr'] = 'Data Rate on the Airside interface';
|
||||
|
||||
//cambium graphs
|
||||
$config['graph_types']['device']['cambium_650_rawReceivePower']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_650_rawReceivePower']['order'] = '0';
|
||||
$config['graph_types']['device']['cambium_650_rawReceivePower']['descr'] = 'Raw Receive Power';
|
||||
$config['graph_types']['device']['cambium_650_transmitPower']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_650_transmitPower']['order'] = '1';
|
||||
$config['graph_types']['device']['cambium_650_transmitPower']['descr'] = 'Transmit Power';
|
||||
$config['graph_types']['device']['cambium_650_modulationMode']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_650_modulationMode']['order'] = '2';
|
||||
$config['graph_types']['device']['cambium_650_modulationMode']['descr'] = 'Moduation Mode';
|
||||
$config['graph_types']['device']['cambium_650_dataRate']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_650_dataRate']['order'] = '3';
|
||||
$config['graph_types']['device']['cambium_650_dataRate']['descr'] = 'Data Rate';
|
||||
$config['graph_types']['device']['cambium_650_ssr']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_650_ssr']['order'] = '4';
|
||||
$config['graph_types']['device']['cambium_650_ssr']['descr'] = 'Signal Strength Ratio';
|
||||
$config['graph_types']['device']['cambium_650_gps']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_650_gps']['order'] = '5';
|
||||
$config['graph_types']['device']['cambium_650_gps']['descr'] = 'GPS Status';
|
||||
|
||||
$config['graph_types']['device']['cambium_250_receivePower']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_250_receivePower']['order'] = '0';
|
||||
$config['graph_types']['device']['cambium_250_receivePower']['descr'] = 'Raw Receive Power';
|
||||
$config['graph_types']['device']['cambium_250_transmitPower']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_250_transmitPower']['order'] = '1';
|
||||
$config['graph_types']['device']['cambium_250_transmitPower']['descr'] = 'Transmit Power';
|
||||
$config['graph_types']['device']['cambium_250_modulationMode']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_250_modulationMode']['order'] = '2';
|
||||
$config['graph_types']['device']['cambium_250_modulationMode']['descr'] = 'Moduation Mode';
|
||||
$config['graph_types']['device']['cambium_250_dataRate']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_250_dataRate']['order'] = '3';
|
||||
$config['graph_types']['device']['cambium_250_dataRate']['descr'] = 'Data Rate';
|
||||
$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']['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';
|
||||
$config['graph_types']['device']['cambium_epmp_RFStatus']['descr'] = 'RF Status';
|
||||
$config['graph_types']['device']['cambium_epmp_gps']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_epmp_gps']['order'] = '1';
|
||||
$config['graph_types']['device']['cambium_epmp_gps']['descr'] = 'GPS Info';
|
||||
$config['graph_types']['device']['cambium_epmp_modulation']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_epmp_modulation']['order'] = '2';
|
||||
$config['graph_types']['device']['cambium_epmp_modulation']['descr'] = 'ePMP Modulation';
|
||||
$config['graph_types']['device']['cambium_epmp_registeredSM']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_epmp_registeredSM']['order'] = '3';
|
||||
$config['graph_types']['device']['cambium_epmp_registeredSM']['descr'] = 'ePMP Registered SM';
|
||||
$config['graph_types']['device']['cambium_epmp_access']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_epmp_access']['order'] = '4';
|
||||
$config['graph_types']['device']['cambium_epmp_access']['descr'] = 'Access Info';
|
||||
$config['graph_types']['device']['cambium_epmp_gpsSync']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_epmp_gpsSync']['order'] = '5';
|
||||
$config['graph_types']['device']['cambium_epmp_gpsSync']['descr'] = 'GPS Sync Status';
|
||||
$config['graph_types']['device']['cambium_epmp_freq']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_epmp_freq']['order'] = '6';
|
||||
$config['graph_types']['device']['cambium_epmp_freq']['descr'] = 'Frequency';
|
||||
|
||||
$config['graph_types']['device']['wifi_clients']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['wifi_clients']['order'] = '0';
|
||||
$config['graph_types']['device']['wifi_clients']['descr'] = 'Wireless Clients';
|
||||
|
||||
@@ -336,6 +336,13 @@ function sensor_low_limit($class, $current) {
|
||||
case 'power':
|
||||
$limit = null;
|
||||
break;
|
||||
|
||||
case 'signal':
|
||||
$limit = ($current * 1.20);
|
||||
if ($limit < -80 && $current > -80) {
|
||||
$limit = -80;
|
||||
}
|
||||
break;
|
||||
}//end switch
|
||||
|
||||
return $limit;
|
||||
@@ -378,6 +385,10 @@ function sensor_limit($class, $current) {
|
||||
case 'power':
|
||||
$limit = ($current * 1.50);
|
||||
break;
|
||||
|
||||
case 'signal';
|
||||
$limit = 0;
|
||||
break;
|
||||
}//end switch
|
||||
|
||||
return $limit;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('/^Cambium PTP 50650/', $sysDescr)) {
|
||||
$os = 'cambium';
|
||||
}
|
||||
else if (preg_match('/^PTP250/', $sysDescr)) {
|
||||
$os = 'cambium';
|
||||
}
|
||||
else if (preg_match('/^Cambium/', $sysDescr)) {
|
||||
$os = 'cambium';
|
||||
}
|
||||
else if (strstr($sysObjectId, '.1.3.6.1.4.1.17713.21')) {
|
||||
$os = 'cambium';
|
||||
}
|
||||
else if (strstr($sysObjectId, 'enterprises.17713.21')) {
|
||||
$os = 'cambium';
|
||||
}
|
||||
}
|
||||
@@ -1,7 +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';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ if (!$os) {
|
||||
$skip_oids = array(
|
||||
'.1.3.6.1.4.1.674.10892.2',
|
||||
'.1.3.6.1.4.1.17163.1.1',
|
||||
'.1.3.6.1.4.1.17713.21'
|
||||
);
|
||||
if (preg_match('/^Linux/', $sysDescr) && !in_array($sysObjectId, $skip_oids)) {
|
||||
$os = 'linux';
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* 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 ($device['os'] == 'cambium') {
|
||||
echo 'Cambium : ';
|
||||
|
||||
$descr = 'Processor';
|
||||
$usage = str_replace('"', "", snmp_get($device, 'CAMBIUM-PMP80211-MIB::sysCPUUsage.0', '-OvQ'));
|
||||
|
||||
if (is_numeric($usage)) {
|
||||
discover_processor($valid['processor'], $device, 'CAMBIUM-PMP80211-MIB::sysCPUUsage.0', '0', 'cambium-cpu', $descr,
|
||||
'100', $usage, null, null);
|
||||
}
|
||||
}
|
||||
@@ -27,3 +27,4 @@ require 'includes/discovery/sensors/charge.inc.php';
|
||||
require 'includes/discovery/sensors/load.inc.php';
|
||||
require 'includes/discovery/sensors/states.inc.php';
|
||||
require 'includes/discovery/sensors/dbm.inc.php';
|
||||
require 'includes/discovery/sensors/signal.inc.php';
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
echo 'Signal: ';
|
||||
// Include all discovery modules
|
||||
$include_dir = 'includes/discovery/sensors/signal';
|
||||
require 'includes/include-dir.inc.php';
|
||||
|
||||
d_echo($valid['sensor']['signal']);
|
||||
|
||||
check_valid_sensors($device, 'signal', $valid['sensor']);
|
||||
|
||||
echo "\n";
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
if ($device['os'] == 'cambium') {
|
||||
$cambium_type = snmp_get($device, 'sysDescr.0', '-Oqv', '');
|
||||
$is_epmp = snmp_get($device, 'sysObjectID.0', '-Oqv', '');
|
||||
$divisor = 1;
|
||||
if (strstr($cambium_type, 'Cambium PTP 50650')) {
|
||||
$mib = 'CAMBIUM-PTP650-MIB';
|
||||
$oid = 'receivePower.0';
|
||||
$divisor = 10;
|
||||
}
|
||||
else if (strstr($cambium_type, 'PTP250')) {
|
||||
$oid = 'receivePower.0';
|
||||
$mib = 'CAMBIUM-PTP250-MIB';
|
||||
$divisor = 10;
|
||||
}
|
||||
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');
|
||||
if ($epmp_ap == 1) {
|
||||
if ($epmp_number != 1) {
|
||||
$oid = 'cambiumSTADLRSSI.0';
|
||||
$mib = 'CAMBIUM-PMP80211-MIB';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$oid = 'cambiumSTADLRSSI.0';
|
||||
$mib = 'CAMBIUM-PMP80211-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 'Cambium Signal ';
|
||||
}
|
||||
|
||||
$type = 'cambium';
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
if ($device['os'] == 'cambium') {
|
||||
$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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,9 @@ function poll_sensor($device, $class, $unit) {
|
||||
if ($device['os'] == 'netapp') {
|
||||
include 'includes/polling/temperatures/netapp.inc.php';
|
||||
}
|
||||
else if ($device['os'] == 'canopy') {
|
||||
include 'includes/polling/temperatures/canopy.inc.php';
|
||||
}
|
||||
else {
|
||||
// Try 5 times to get a valid temp reading
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
@@ -42,6 +45,11 @@ function poll_sensor($device, $class, $unit) {
|
||||
else if ($class == 'state') {
|
||||
$sensor_value = trim(str_replace('"', '', snmp_walk($device, $sensor['sensor_oid'], '-Oevq', 'SNMPv2-MIB')));
|
||||
}
|
||||
else if ($class == 'signal') {
|
||||
$currentOS = $device['os'];
|
||||
include "includes/polling/signal/$currentOS.inc.php";
|
||||
$sensor_value = trim(str_replace('"', '', snmp_get($device, $sensor['sensor_oid'], '-OUqnv', "SNMPv2-MIB$mib")));
|
||||
}
|
||||
else if ($class == 'dbm') {
|
||||
$sensor_value = trim(str_replace('"', '', snmp_get($device, $sensor['sensor_oid'], '-OUqnv', "SNMPv2-MIB$mib")));
|
||||
//iosxr does not expose dbm values through SNMP so we convert Watts to dbm to have a nice graph to show
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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', '');
|
||||
$is_epmp = snmp_get($device, 'sysObjectID.0', '-Oqv', '');
|
||||
$version = $cambium_type;
|
||||
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, '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($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');
|
||||
if ($epmp_ap == 1) {
|
||||
if ($epmp_number == 5) {
|
||||
$hardware = 'ePTP Master';
|
||||
}
|
||||
else {
|
||||
$hardware = 'ePMP AP';
|
||||
}
|
||||
}
|
||||
else if ($epmp_ap == 2) {
|
||||
if ($epmp_number == 4) {
|
||||
$hardware = 'ePTP Slave';
|
||||
}
|
||||
else {
|
||||
$hardware = 'ePMP SM';
|
||||
}
|
||||
}
|
||||
$version = snmp_get($device, 'cambiumCurrentuImageVersion.0', '-Oqv', 'CAMBIUM-PMP80211-MIB');
|
||||
include 'includes/polling/wireless/cambium-epmp.inc.php';
|
||||
}
|
||||
@@ -1,13 +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.
|
||||
*/
|
||||
|
||||
$canopy_type = snmp_get($device, 'boxDeviceType.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB');
|
||||
|
||||
if (stristr($canopy_type, 'MIMO OFDM')) {
|
||||
$hardware = 'PMP 450';
|
||||
$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 (stristr($canopy_type, 'OFDM')) {
|
||||
$hardware = 'PMP 430';
|
||||
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 {
|
||||
$hardware = 'PMP 100';
|
||||
}
|
||||
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';
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
echo 'Cambium CPU Usage';
|
||||
|
||||
if ($device['os'] == 'cambium') {
|
||||
$usage = str_replace('"', "", snmp_get($device, 'CAMBIUM-PMP80211-MIB::sysCPUUsage.0', '-OvQ'));
|
||||
|
||||
if (is_numeric($usage)) {
|
||||
$proc = ($usage / 10);
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ $supported_sensors = array(
|
||||
'charge' => '%',
|
||||
'load' => '%',
|
||||
'state' => '#',
|
||||
'signal' => 'dBm',
|
||||
);
|
||||
|
||||
foreach ($supported_sensors as $sensor_type => $sensor_unit) {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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', '');
|
||||
$is_epmp = snmp_get($device, 'sysObjectID.0', '-Oqv', '');
|
||||
if (strstr($cambium_type, 'Cambium PTP 50650')) {
|
||||
$mib = ':CAMBIUM-PTP650-MIB';
|
||||
}
|
||||
else if (strstr($cambium_type, 'PTP250')) {
|
||||
$mib = ':CAMBIUM-PTP250-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');
|
||||
if ($epmp_ap == 1) {
|
||||
if ($epmp_number != 1) {
|
||||
$mib = ':CAMBIUM-PMP80211-MIB';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$mib = ':CAMBIUM-PMP80211-MIB';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$mib = ':WHISP-BOX-MIBV2-MIB';
|
||||
}
|
||||
@@ -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';
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
$sensor_value = trim(str_replace('"', '', snmp_get($device, $sensor['sensor_oid'], '-OUqnv', "SNMPv2-MIB:WHISP-BOX-MIBV2-MIB")));
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
$sensor_value = trim(str_replace('"', '', snmp_get($device, $sensor['sensor_oid'], '-OUqnv', "SNMPv2-MIB:WHISP-BOX-MIBV2-MIB")));
|
||||
@@ -0,0 +1,88 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-250-transmitPower.rrd";
|
||||
$transmitPower = snmp_get($device, "transmitPower.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
if (is_numeric($transmitPower)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:transmitPower:GAUGE:600:0:100".$config['rrd_rra']);
|
||||
}
|
||||
$transmitPower = $transmitPower / 10;
|
||||
$fields = array(
|
||||
'transmitPower' => $transmitPower,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_250_transmitPower'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-250-receivePower.rrd";
|
||||
$receivePower = snmp_get($device, "receivePower.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
$noiseFloor = snmp_get($device, "noiseFloor.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
if (is_numeric($receivePower)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:receivePower:GAUGE:600:-150:0 DS:noiseFloor:GAUGE:600:-150:0".$config['rrd_rra']);
|
||||
}
|
||||
$receivePower = $receivePower / 10;
|
||||
$fields = array(
|
||||
'receivePower' => $receivePower,
|
||||
'noiseFloor' => $noiseFloor,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_250_receivePower'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-250-modulationMode.rrd";
|
||||
$txModulation = snmp_get($device, ".1.3.6.1.4.1.17713.250.5.9.0", "-Ovqn", "");
|
||||
$rxModulation = snmp_get($device, ".1.3.6.1.4.1.17713.250.5.8.0", "-Ovqn", "");
|
||||
if (is_numeric($txModulation) && is_numeric($rxModulation)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:txModulation:GAUGE:600:0:24 DS:rxModulation:GAUGE:600:0:24".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'txModuation' => $txModulation,
|
||||
'rxModulation' => $rxModulation,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_250_modulationMode'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-250-dataRate.rrd";
|
||||
$receiveDataRate = snmp_get($device, "receiveDataRate.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
$transmitDataRate = snmp_get($device, "transmitDataRate.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
$aggregateDataRate = snmp_get($device, "aggregateDataRate.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
if (is_numeric($receiveDataRate) && is_numeric($transmitDataRate) && is_numeric($aggregateDataRate)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:receiveDataRate:GAUGE:600:0:10000 DS:transmitDataRate:GAUGE:600:0:10000 DS:aggregateDataRate:GAUGE:600:0:10000".$config['rrd_rra']);
|
||||
}
|
||||
$receiveDataRate = $receiveDataRate / 100;
|
||||
$transmitDataRate = $transmitDataRate / 100;
|
||||
$aggregateDataRate = $aggregateDataRate / 100;
|
||||
$fields = array(
|
||||
'receiveDataRate' => $receiveDataRate,
|
||||
'transmitDataRate' => $transmitDataRate,
|
||||
'aggregateDataRate' => $aggregateDataRate,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_250_dataRate'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-250-ssr.rrd";
|
||||
$ssr = snmp_get($device, "signalStrengthRatio.0", "-Ovqn", "CAMBIUM-PTP250-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['cambium_250_ssr'] = TRUE;
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-650-transmitPower.rrd";
|
||||
$transmitPower = snmp_get($device, "transmitPower.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
if (is_numeric($transmitPower)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:transmitPower:GAUGE:600:0:100".$config['rrd_rra']);
|
||||
}
|
||||
$transmitPower = $transmitPower / 10;
|
||||
$fields = array(
|
||||
'transmitPower' => $transmitPower,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_650_transmitPower'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-650-rawReceivePower.rrd";
|
||||
$rawReceivePower = snmp_get($device, "rawReceivePower.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
if (is_numeric($rawReceivePower)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:rawReceivePower:GAUGE:600:-100:0".$config['rrd_rra']);
|
||||
}
|
||||
$rawReceivePower = $rawReceivePower / 10;
|
||||
$fields = array(
|
||||
'rawReceivePower' => $rawReceivePower,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_650_rawReceivePower'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-650-modulationMode.rrd";
|
||||
$txModulation = snmp_get($device, ".1.3.6.1.4.1.17713.7.12.15.0", "-Ovqn", "");
|
||||
$rxModulation = snmp_get($device, ".1.3.6.1.4.1.17713.7.12.14.0", "-Ovqn", "");
|
||||
if (is_numeric($txModulation) && is_numeric($rxModulation)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:txModulation:GAUGE:600:0:24 DS:rxModulation:GAUGE:600:0:24".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'txModuation' => $txModulation,
|
||||
'rxModulation' => $rxModulation,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_650_modulationMode'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-650-dataRate.rrd";
|
||||
$receiveDataRate = snmp_get($device, "receiveDataRate.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
$transmitDataRate = snmp_get($device, "transmitDataRate.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
$aggregateDataRate = snmp_get($device, "aggregateDataRate.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
if (is_numeric($receiveDataRate) && is_numeric($transmitDataRate) && is_numeric($aggregateDataRate)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:receiveDataRate:GAUGE:600:0:10000 DS:transmitDataRate:GAUGE:600:0:10000 DS:aggregateDataRate:GAUGE:600:0:10000".$config['rrd_rra']);
|
||||
}
|
||||
$receiveDataRate = $receiveDataRate / 100;
|
||||
$transmitDataRate = $transmitDataRate / 100;
|
||||
$aggregateDataRate = $aggregateDataRate / 100;
|
||||
$fields = array(
|
||||
'receiveDataRate' => $receiveDataRate,
|
||||
'transmitDataRate' => $transmitDataRate,
|
||||
'aggregateDataRate' => $aggregateDataRate,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_650_dataRate'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-650-ssr.rrd";
|
||||
$ssr = snmp_get($device, "signalStrengthRatio.0", "-Ovqn", "CAMBIUM-PTP650-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['cambium_650_ssr'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-650-gps.rrd";
|
||||
$gps = snmp_get($device, "tDDSynchronizationStatus.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
if ($gps == 'locked') {
|
||||
$gps = 0;
|
||||
}
|
||||
else if ($gps == 'holdover') {
|
||||
$gps = 1;
|
||||
}
|
||||
else if ($gps == 'holdoverNoGPSSyncIn') {
|
||||
$gps = 2;
|
||||
}
|
||||
else if ($gps == 'notSynchronized') {
|
||||
$gps = 3;
|
||||
}
|
||||
else if ($gps == 'notSynchronizedNoGPSSyncIn') {
|
||||
$gps = 4;
|
||||
}
|
||||
else if ($gps == 'pTPSYNCNotConnected') {
|
||||
$gps = 5;
|
||||
}
|
||||
else if ($gps == 'initialising') {
|
||||
$gps = 6;
|
||||
}
|
||||
else if ($gps == 'clusterTimingMaster') {
|
||||
$gps = 7;
|
||||
}
|
||||
else if ($gps == 'acquiringLock') {
|
||||
$gps = 8;
|
||||
}
|
||||
else if ($gps == 'inactive') {
|
||||
$gps = 9;
|
||||
}
|
||||
if (is_numeric($gps)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:gps:GAUGE:600:0:10".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'gps' => $gps,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_650_gps'] = TRUE;
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-epmp-RFStatus.rrd';
|
||||
$cambiumSTADLRSSI = snmp_get($device, "cambiumSTADLRSSI.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
$cambiumSTADLSNR = snmp_get($device, "cambiumSTADLSNR.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
if (is_numeric($cambiumSTADLRSSI) && is_numeric($cambiumSTADLSNR)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:cambiumSTADLRSSI:GAUGE:600:-150:0 DS:cambiumSTADLSNR:GAUGE:600:0:150".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'cambiumSTADLRSSI' => $cambiumSTADLRSSI,
|
||||
'cambiumSTADLSNR' => $cambiumSTADLSNR
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_epmp_RFStatus'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-epmp-gps.rrd';
|
||||
$cambiumGPSNumTrackedSat = snmp_get($device, "cambiumGPSNumTrackedSat.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
$cambiumGPSNumVisibleSat = snmp_get($device, "cambiumGPSNumVisibleSat.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
if (is_numeric($cambiumGPSNumTrackedSat) && is_numeric($cambiumGPSNumVisibleSat)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:numTracked:GAUGE:600:0:100000 DS:numVisible:GAUGE:600:0:100000".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'numTracked' => $cambiumGPSNumTrackedSat,
|
||||
'numVisible' => $cambiumGPSNumVisibleSat
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_epmp_gps'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-epmp-modulation.rrd';
|
||||
$cambiumSTAUplinkMCSMode = snmp_get($device, "cambiumSTAUplinkMCSMode.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
$cambiumSTADownlinkMCSMode = snmp_get($device, "cambiumSTADownlinkMCSMode.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
if (is_numeric($cambiumSTAUplinkMCSMode) && is_numeric($cambiumSTADownlinkMCSMode)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:uplinkMCSMode:GAUGE:600:-30:30 DS:downlinkMCSMode:GAUGE:600:-30:30".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'uplinkMCSMode' => $cambiumSTAUplinkMCSMode,
|
||||
'downlinkMCSMode' => $cambiumSTADownlinkMCSMode
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_epmp_modulation'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-epmp-registeredSM.rrd';
|
||||
$registeredSM = snmp_get($device, "cambiumAPNumberOfConnectedSTA.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
if (is_numeric($registeredSM)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:regSM:GAUGE:600:0:10000".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'regSM' => $registeredSM,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_epmp_registeredSM'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-epmp-access.rrd';
|
||||
$sysNetworkEntryAttempt = snmp_get($device, "sysNetworkEntryAttempt.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
$sysNetworkEntrySuccess = snmp_get($device, "sysNetworkEntrySuccess.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
$sysNetworkEntryAuthenticationFailure = snmp_get($device, "sysNetworkEntryAuthenticationFailure.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
if (is_numeric($sysNetworkEntryAttempt) && is_numeric($sysNetworkEntrySuccess) && is_numeric($sysNetworkEntryAuthenticationFailure)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:entryAttempt:GAUGE:600:0:100000 DS:entryAccess:GAUGE:600:0:100000 DS:authFailure:GAUGE:600:0:100000".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'entryAttempt' => $sysNetworkEntryAttempt,
|
||||
'entryAccess' => $sysNetworkEntrySuccess,
|
||||
'authFailure' => $sysNetworkEntryAuthenticationFailure
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_epmp_access'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-epmp-gpsSync.rrd";
|
||||
$gpsSync = snmp_get($device, "cambiumEffectiveSyncSource.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
if (is_numeric($gpsSync)) {
|
||||
if (!is_file($rrd_filename)) {
|
||||
rrdtool_create($rrd_filename, " --step 300 DS:gpsSync:GAUGE:600:0:4".$config['rrd_rra']);
|
||||
}
|
||||
$fields = array(
|
||||
'gpsSync' => $gpsSync,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_epmp_gpsSync'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-epmp-freq.rrd";
|
||||
$freq = snmp_get($device, "cambiumSTAConnectedRFFrequency.0", "-Ovqn", "CAMBIUM-PMP80211-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']);
|
||||
}
|
||||
$fields = array(
|
||||
'freq' => $freq,
|
||||
);
|
||||
rrdtool_update($rrd_filename, $fields);
|
||||
$graphs['cambium_epmp_freq'] = TRUE;
|
||||
}
|
||||
@@ -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'] . "/cambium-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['cambium_generic_errorCount'] = TRUE;
|
||||
unset($rrd_filename,$fecInErrorsCount,$fecOutErrorsCount);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_crcErrors'] = TRUE;
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_signalHV'] = TRUE;
|
||||
unset($rrd_filename,$vertical,$horizontal,$combined);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_rssi'] = TRUE;
|
||||
unset($rrd_filename,$rssi);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_jitter'] = TRUE;
|
||||
unset($rrd_filename,$jitter);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_450_slaveHV'] = TRUE;
|
||||
unset($rrd_filename,$horizontal,$vertical);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_450_slaveSSR'] = TRUE;
|
||||
unset($rrd_filename,$ssr);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_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'] . "/cambium-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['cambium_generic_whispGPSStats'] = TRUE;
|
||||
unset($rrd_filename,$gpsStatus);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_gpsStats'] = TRUE;
|
||||
unset($rrd_filename,$visible,$tracked);
|
||||
}
|
||||
}
|
||||
//PTP Equipment
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_450_powerlevel'] = TRUE;
|
||||
unset($lastLevel);
|
||||
}
|
||||
|
||||
if (strstr($version, 'AP') == false) {
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_450_linkRadioDbm'] = TRUE;
|
||||
unset($rrd_filename,$horizontal,$horizontal);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_450_ptpSNR'] = TRUE;
|
||||
unset($rrd_filename,$horizontal,$horizontal);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_450_masterSSR'] = TRUE;
|
||||
unset($rrd_filename,$ssr);
|
||||
}
|
||||
|
||||
if (strstr($hardware, 'PTP 230')) {
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_radioDbm'] = TRUE;
|
||||
unset($rrd_filename,$dbmRadio,$minRadio,$maxRadio,$avgRadio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//AP Equipment
|
||||
if (strstr($version, 'AP')) {
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_regCount'] = TRUE;
|
||||
unset($rrd_filename,$registered,$failed);
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cambium-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['cambium_generic_freq'] = TRUE;
|
||||
unset($rrd_filename,$freq);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user