From 0dd3ec25d320bb4ad9a7d226894c23414960c354 Mon Sep 17 00:00:00 2001 From: Paul Heinrichs Date: Wed, 6 Dec 2017 16:36:01 -0500 Subject: [PATCH] device: Update Cambium devices to the new wireless sensors (#7703) * Inital cambium refactor * Refactored tests * Remove CMM from pmp group * Add sensors / Give CMM individual OS * Fix linting * More Sensors / states and Revised Headers * Added old graphs / more sensors * Add modulation rate to sensor * Fix Hardware detection bug * Further hardware detection refinments * Modify pmp hardware detection * New Wireless Metric - SSR * SSR Sensor Graph * Migrate SSR to metric * Added last metric file * Add master check to isAp method * Fix variables in epmp * CMM Discovery and state addition * Add another test for cmm --- LibreNMS/Device/WirelessSensor.php | 6 + .../Sensors/WirelessSsrDiscovery.php | 37 + .../Polling/Sensors/WirelessSsrPolling.php | 38 + LibreNMS/OS/Epmp.php | 131 + LibreNMS/OS/Pmp.php | 198 ++ LibreNMS/OS/Ptp250.php | 189 ++ LibreNMS/OS/Ptp650.php | 165 ++ doc/Developing/os/Wireless-Sensors.md | 33 +- .../graphs/device/wireless_ssr.inc.php | 10 + html/includes/graphs/wireless/ssr.inc.php | 9 + includes/definitions/canopy.yaml | 12 - includes/definitions/cmm.yaml | 20 + includes/definitions/discovery/cmm.yaml | 13 + includes/definitions/discovery/epmp.yaml | 16 + includes/definitions/discovery/pmp.yaml | 22 + includes/definitions/discovery/ptp650.yaml | 21 + .../definitions/{cambium.yaml => epmp.yaml} | 9 +- includes/definitions/pmp.yaml | 14 + includes/definitions/ptp250.yaml | 11 + includes/definitions/ptp650.yaml | 11 + includes/discovery/processors/epmp.inc.php | 30 + includes/polling/os/epmp.inc.php | 105 + includes/polling/os/pmp.inc.php | 240 ++ includes/polling/os/ptp250.inc.php | 16 + includes/polling/os/ptp650.inc.php | 16 + includes/polling/wireless/cambium-250.inc.php | 83 +- includes/polling/wireless/cambium-650.inc.php | 136 +- .../polling/wireless/cambium-epmp.inc.php | 68 +- .../polling/wireless/canopy-generic.inc.php | 151 +- mibs/cambium/CMM3-MIB.txt | 2171 +++++++++++++++++ tests/snmpsim/cambium_ptp.snmprec | 2 - tests/snmpsim/canopy_cmm.snmprec | 1 - tests/snmpsim/cmm_1.snmprec | 2 + tests/snmpsim/cmm_2.snmprec | 2 + .../snmpsim/{cambium.snmprec => epmp.snmprec} | 2 +- tests/snmpsim/{canopy.snmprec => pmp.snmprec} | 0 ...{cambium_ptp250.snmprec => ptp250.snmprec} | 2 +- ...ambium_ptp50650.snmprec => ptp650.snmprec} | 0 38 files changed, 3737 insertions(+), 255 deletions(-) create mode 100644 LibreNMS/Interfaces/Discovery/Sensors/WirelessSsrDiscovery.php create mode 100644 LibreNMS/Interfaces/Polling/Sensors/WirelessSsrPolling.php create mode 100644 LibreNMS/OS/Epmp.php create mode 100644 LibreNMS/OS/Pmp.php create mode 100644 LibreNMS/OS/Ptp250.php create mode 100644 LibreNMS/OS/Ptp650.php create mode 100644 html/includes/graphs/device/wireless_ssr.inc.php create mode 100644 html/includes/graphs/wireless/ssr.inc.php delete mode 100644 includes/definitions/canopy.yaml create mode 100644 includes/definitions/cmm.yaml create mode 100644 includes/definitions/discovery/cmm.yaml create mode 100644 includes/definitions/discovery/epmp.yaml create mode 100644 includes/definitions/discovery/pmp.yaml create mode 100644 includes/definitions/discovery/ptp650.yaml rename includes/definitions/{cambium.yaml => epmp.yaml} (56%) create mode 100644 includes/definitions/pmp.yaml create mode 100644 includes/definitions/ptp250.yaml create mode 100644 includes/definitions/ptp650.yaml create mode 100644 includes/discovery/processors/epmp.inc.php create mode 100644 includes/polling/os/epmp.inc.php create mode 100644 includes/polling/os/pmp.inc.php create mode 100644 includes/polling/os/ptp250.inc.php create mode 100644 includes/polling/os/ptp650.inc.php create mode 100644 mibs/cambium/CMM3-MIB.txt delete mode 100644 tests/snmpsim/cambium_ptp.snmprec delete mode 100644 tests/snmpsim/canopy_cmm.snmprec create mode 100644 tests/snmpsim/cmm_1.snmprec create mode 100644 tests/snmpsim/cmm_2.snmprec rename tests/snmpsim/{cambium.snmprec => epmp.snmprec} (55%) rename tests/snmpsim/{canopy.snmprec => pmp.snmprec} (100%) rename tests/snmpsim/{cambium_ptp250.snmprec => ptp250.snmprec} (69%) rename tests/snmpsim/{cambium_ptp50650.snmprec => ptp650.snmprec} (100%) diff --git a/LibreNMS/Device/WirelessSensor.php b/LibreNMS/Device/WirelessSensor.php index 2ed54a43cf..3b9a6588a4 100644 --- a/LibreNMS/Device/WirelessSensor.php +++ b/LibreNMS/Device/WirelessSensor.php @@ -175,6 +175,12 @@ class WirelessSensor extends Sensor 'unit' => 'dB', 'icon' => 'signal', ), + 'ssr' => array( + 'short' => 'SSR', + 'long' => 'Signal Strength Ratio', + 'unit' => 'dB', + 'icon' => 'signal', + ), 'mse' => array( 'short' => 'MSE', 'long' => 'Mean Square Error', diff --git a/LibreNMS/Interfaces/Discovery/Sensors/WirelessSsrDiscovery.php b/LibreNMS/Interfaces/Discovery/Sensors/WirelessSsrDiscovery.php new file mode 100644 index 0000000000..c520688b61 --- /dev/null +++ b/LibreNMS/Interfaces/Discovery/Sensors/WirelessSsrDiscovery.php @@ -0,0 +1,37 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2017 Paul Heinrichs + * @author Paul Heinrichs + */ + +namespace LibreNMS\Interfaces\Discovery\Sensors; + +interface WirelessSsrDiscovery +{ + /** + * Discover wireless SSR. This is in dB. Type is ssr. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessSsr(); +} diff --git a/LibreNMS/Interfaces/Polling/Sensors/WirelessSsrPolling.php b/LibreNMS/Interfaces/Polling/Sensors/WirelessSsrPolling.php new file mode 100644 index 0000000000..fc8a5942cb --- /dev/null +++ b/LibreNMS/Interfaces/Polling/Sensors/WirelessSsrPolling.php @@ -0,0 +1,38 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2017 Paul Heinrichs + * @author Paul Heinrichs + */ + +namespace LibreNMS\Interfaces\Polling\Sensors; + +interface WirelessSsrPolling +{ + /** + * Poll wireless SSR in dB + * The returned array should be sensor_id => value pairs + * + * @param array $sensors Array of sensors needed to be polled + * @return array of polled data + */ + public function pollWirelessSsr(array $sensors); +} diff --git a/LibreNMS/OS/Epmp.php b/LibreNMS/OS/Epmp.php new file mode 100644 index 0000000000..1f62e0e188 --- /dev/null +++ b/LibreNMS/OS/Epmp.php @@ -0,0 +1,131 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2017 Paul Heinrichs + * @author Paul Heinrichs + */ + +namespace LibreNMS\OS; + +use LibreNMS\Device\WirelessSensor; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessFrequencyDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery; +use LibreNMS\OS; + +class Epmp extends OS implements + WirelessRssiDiscovery, + WirelessSnrDiscovery, + WirelessFrequencyDiscovery, + WirelessClientsDiscovery +{ + /** + * Discover wireless bit/packet error ratio. This is in percent. Type is error-ratio. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessRssi() + { + $rssi_oid = '.1.3.6.1.4.1.17713.21.1.2.3.0'; //CAMBIUM-PMP80211-MIB::cambiumSTADLRSSI.0 + return array( + new WirelessSensor( + 'rssi', + $this->getDeviceId(), + $rssi_oid, + 'epmp', + 0, + 'Cambium ePMP RSSI', + null + ) + ); + } + + /** + * Discover wireless SNR. This is in dB. Type is snr. + * Formula: SNR = Signal or Rx Power - Noise Floor + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessSnr() + { + $snr = '.1.3.6.1.4.1.17713.21.1.2.18.0'; //CAMBIUM-PMP80211-MIB::cambiumSTADLSNR.0 + return array( + new WirelessSensor( + 'snr', + $this->getDeviceId(), + $snr, + 'epmp', + 0, + 'Cambium ePMP SNR', + null + ) + ); + } + + /** + * Discover wireless frequency. This is in MHz. Type is frequency. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessFrequency() + { + $frequency = '.1.3.6.1.4.1.17713.21.1.2.1.0'; //CAMBIUM-PMP80211-MIB::cambiumSTAConnectedRFFrequency" + return array( + new WirelessSensor( + 'frequency', + $this->getDeviceId(), + $frequency, + 'epmp', + 0, + 'Cambium ePMP Frequency', + null + ) + ); + } + + + + /** + * Discover wireless client counts. Type is clients. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessClients() + { + $registeredSM = '.1.3.6.1.4.1.17713.21.1.2.10.0'; //CAMBIUM-PMP80211-MIB::cambiumAPNumberOfConnectedSTA.0 + return array( + new WirelessSensor( + 'clients', + $this->getDeviceId(), + $registeredSM, + 'epmp', + 0, + 'Client Count', + null + ) + ); + } +} diff --git a/LibreNMS/OS/Pmp.php b/LibreNMS/OS/Pmp.php new file mode 100644 index 0000000000..43ea6a0088 --- /dev/null +++ b/LibreNMS/OS/Pmp.php @@ -0,0 +1,198 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2017 Paul Heinrichs + * @author Paul Heinrichs + */ + +namespace LibreNMS\OS; + +use LibreNMS\Device\WirelessSensor; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessFrequencyDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessUtilizationDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessSsrDiscovery; +use LibreNMS\OS; + +class Pmp extends OS implements + WirelessRssiDiscovery, + WirelessSnrDiscovery, + WirelessFrequencyDiscovery, + WirelessUtilizationDiscovery, + WirelessSsrDiscovery +{ + + /** + * Discover wireless bit/packet error ratio. This is in percent. Type is error-ratio. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessRssi() + { + $rssi_oid = '.1.3.6.1.4.1.161.19.3.2.2.2.0'; + return array( + new WirelessSensor( + 'rssi', + $this->getDeviceId(), + $rssi_oid, + 'pmp', + 0, + 'Cambium RSSI', + null + ) + ); + } + + /** + * Discover wireless SNR. This is in dB. Type is snr. + * Formula: SNR = Signal or Rx Power - Noise Floor + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessSnr() + { + if ($this->isAp()) { + $snr_horizontal = '.1.3.6.1.4.1.161.19.3.1.4.1.84.2'; // WHISP-APS-MIB::signalToNoiseRatioHorizontal.2 + $snr_vertical = '.1.3.6.1.4.1.161.19.3.1.4.1.74.2'; //WHISP-APS-MIB::signalToNoiseRatioVertical.2 + } else { + $snr_horizontal = '.1.3.6.1.4.1.161.19.3.2.2.106.0'; // WHISP-SMS-MIB::signalToNoiseRatioSMHorizontal.0 + $snr_vertical = '.1.3.6.1.4.1.161.19.3.2.2.95.0'; //WHISP-SMS-MIB::signalToNoiseRatioSMVertical.0 + } + + return array( + new WirelessSensor( + 'snr', + $this->getDeviceId(), + $snr_horizontal, + 'pmp-h', + 0, + 'Cambium SNR Horizontal', + null + ), + new WirelessSensor( + 'snr', + $this->getDeviceId(), + $snr_vertical, + 'pmp-v', + 0, + 'Cambium SNR Vertical', + null + ) + ); + } + + /** + * Discover wireless frequency. This is in MHz. Type is frequency. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessFrequency() + { + $frequency = '.1.3.6.1.4.1.161.19.3.1.7.37.0'; //WHISP-APS-MIB::currentRadioFreqCarrier + return array( + new WirelessSensor( + 'frequency', + $this->getDeviceId(), + $frequency, + 'pmp', + 0, + 'Frequency', + null, + 1, + 10000 + ) + ); + } + + + /** + * Discover wireless utilization. This is in %. Type is utilization. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessUtilization() + { + $downlink = '.1.3.6.1.4.1.161.19.3.1.12.1.1.0'; //WHISP-APS-MIB::frUtlLowTotalDownlinkUtilization + $uplink = '.1.3.6.1.4.1.161.19.3.1.12.1.2.0'; //WHISP-APS-MIB::frUtlLowTotalUplinkUtilization + return array( + new WirelessSensor( + 'utilization', + $this->getDeviceId(), + $downlink, + 'pmp-downlink', + 0, + 'Downlink Utilization', + null + ), + new WirelessSensor( + 'utilization', + $this->getDeviceId(), + $uplink, + 'pmp-uplink', + 0, + 'Uplink Utilization', + null + ) + ); + } + + /** + * Discover wireless SSR. This is in dB. Type is ssr. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessSsr() + { + if ($this->isAp()) { + $ssr = '.1.3.6.1.4.1.161.19.3.1.4.1.86.2'; //WHISP-APS-MIB::signalStrengthRatio.2 + } else { + $ssr = '.1.3.6.1.4.1.161.19.3.2.2.108.0'; //WHISP-SMSSM-MIB::signalStrengthRatio.0 + } + return array( + new WirelessSensor( + 'ssr', + $this->getDeviceId(), + $ssr, + 'pmp', + 0, + 'Cambium Signal Strength Ratio', + null + ) + ); + } + + /** + * Private method to declare if device is an AP + * + * @return boolean + */ + private function isAp() + { + $device = $this->getDevice(); + return str_contains($device['hardware'], 'AP') || str_contains($device['hardware'], 'Master'); + } +} diff --git a/LibreNMS/OS/Ptp250.php b/LibreNMS/OS/Ptp250.php new file mode 100644 index 0000000000..e83557932a --- /dev/null +++ b/LibreNMS/OS/Ptp250.php @@ -0,0 +1,189 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2017 Paul Heinrichs + * @author Paul Heinrichs + */ + +namespace LibreNMS\OS; + +use LibreNMS\Device\WirelessSensor; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessPowerDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessNoiseFloorDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessRateDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessSsrDiscovery; +use LibreNMS\OS; + +class Ptp250 extends OS implements + WirelessPowerDiscovery, + WirelessNoiseFloorDiscovery, + WirelessRateDiscovery, + WirelessSsrDiscovery +{ + /** + * Discover wireless tx or rx power. This is in dBm. Type is power. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array + */ + public function discoverWirelessPower() + { + $transmit = '.1.3.6.1.4.1.17713.250.5.3.0'; //"CAMBIUM-PTP250-MIB::transmitPower.0" + $receive = '.1.3.6.1.4.1.17713.250.5.1.0'; //"CAMBIUM-PTP250-MIB::receivePower.0"; + return array( + new WirelessSensor( + 'power', + $this->getDeviceId(), + $transmit, + 'ptp250-tx', + 0, + 'PTP250 Transmit', + null, + 1, + 10 + ), + new WirelessSensor( + 'power', + $this->getDeviceId(), + $receive, + 'ptp250-rx', + 0, + 'PTP250 Receive', + null, + 1, + 10 + ) + ); + } + + /** + * Discover wireless noise floor. This is in dBm/Hz. Type is noise-floor. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array + */ + public function discoverWirelessNoiseFloor() + { + $noise_floor = '.1.3.6.1.4.1.17713.250.5.15.0'; //"CAMBIUM-PTP250-MIB::noiseFloor.0";; + return array( + new WirelessSensor( + 'noise-floor', + $this->getDeviceId(), + $noise_floor, + 'ptp250', + 0, + 'PTP250 Noise Floor', + null + ) + ); + } + + + /** + * Discover wireless rate. This is in bps. Type is rate. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array + */ + public function discoverWirelessRate() + { + $receive = '.1.3.6.1.4.1.17713.250.11.1.0'; //"CAMBIUM-PTP250-MIB::receiveDataRate.0" + $transmit = '.1.3.6.1.4.1.17713.250.11.2.0'; //"CAMBIUM-PTP250-MIB::transmitDataRate.0" + $aggregate = '.1.3.6.1.4.1.17713.250.11.3.0'; //"CAMBIUM-PTP250-MIB::aggregateDataRate.0" + $txModulation = ".1.3.6.1.4.1.17713.250.5.9.0"; + $rxModulation = ".1.3.6.1.4.1.17713.250.5.8.0"; + return array( + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $receive, + 'ptp250-rx-rate', + 0, + 'PTP250 Receive Rate', + null, + 1, + 100 + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $transmit, + 'ptp250-tx-rate', + 0, + 'PTP250 Transmit Rate', + null, + 1, + 100 + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $aggregate, + 'ptp250-ag-rate', + 0, + 'PTP250 Aggragate Rate', + null, + 1, + 100 + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $txModulation, + 'ptp250-tx-mod', + 0, + 'PTP250 Transmit Modulation Rate', + null + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $rxModulation, + 'ptp250-rx-mod', + 0, + 'PTP250 Receive Modulation Rate', + null + ), + ); + } + + /** + * Discover wireless SSR. This is in dB. Type is ssr. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessSsr() + { + $ssr = '.1.3.6.1.4.1.17713.250.5.13.0'; // CAMBIUM-PTP250-MIB::signalStrengthRatio.0 + return array( + new WirelessSensor( + 'ssr', + $this->getDeviceId(), + $ssr, + 'ptp250', + 0, + 'PTP250 Signal Strength Ratio', + null + ) + ); + } +} diff --git a/LibreNMS/OS/Ptp650.php b/LibreNMS/OS/Ptp650.php new file mode 100644 index 0000000000..aef75d3f74 --- /dev/null +++ b/LibreNMS/OS/Ptp650.php @@ -0,0 +1,165 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2017 Paul Heinrichs + * @author Paul Heinrichs + */ + +namespace LibreNMS\OS; + +use LibreNMS\Device\WirelessSensor; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessPowerDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessRateDiscovery; +use LibreNMS\Interfaces\Discovery\Sensors\WirelessSsrDiscovery; + +use LibreNMS\OS; + +class Ptp650 extends OS implements + WirelessPowerDiscovery, + WirelessRateDiscovery, + WirelessSsrDiscovery +{ + /** + * Discover wireless tx or rx power. This is in dBm. Type is power. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array + */ + public function discoverWirelessPower() + { + $transmit = '.1.3.6.1.4.1.17713.7.12.4.0'; //CAMBIUM-PTP650-MIB::transmitPower.0 + $receive = '.1.3.6.1.4.1.17713.7.12.12.0'; //CAMBIUM-PTP650ptp650-MIB::rawReceivePower.0 + return array( + new WirelessSensor( + 'power', + $this->getDeviceId(), + $transmit, + 'ptp650-tx', + 0, + 'ptp650 Transmit', + null, + 1, + 10 + ), + new WirelessSensor( + 'power', + $this->getDeviceId(), + $receive, + 'ptp650-rx', + 0, + 'ptp650 Receive', + null, + 1, + 10 + ) + ); + } + + /** + * Discover wireless rate. This is in bps. Type is rate. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array + */ + public function discoverWirelessRate() + { + $receive = '.1.3.6.1.4.1.17713.7.20.1.0'; //CAMBIUM-PTP650-MIB::receiveDataRate.0 + $transmit = '.1.3.6.1.4.1.17713.7.20.2.0'; //CAMBIUM-PTP650-MIB::transmitDataRate.0 + $aggregate = '.1.3.6.1.4.1.17713.7.20.3.0'; //CAMBIUM-PTP650-MIB::aggregateDataRate.0 + $txModulation = ".1.3.6.1.4.1.17713.7.12.15.0"; + $rxModulation = ".1.3.6.1.4.1.17713.7.12.14.0"; + return array( + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $receive, + 'ptp650-rx-rate', + 0, + 'PTP650 Receive Rate', + null, + 1, + 100 + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $transmit, + 'ptp650-tx-rate', + 0, + 'PTP650 Transmit Rate', + null, + 1, + 100 + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $aggregate, + 'ptp650-ag-rate', + 0, + 'PTP650 Aggragate Rate', + null, + 1, + 100 + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $txModulation, + 'ptp650-tx-mod', + 0, + 'PTP650 Transmit Modulation Rate', + null + ), + new WirelessSensor( + 'rate', + $this->getDeviceId(), + $rxModulation, + 'ptp650-rx-mod', + 0, + 'PTP650 Receive Modulation Rate', + null + ), + ); + } + + /** + * Discover wireless SSR. This is in dB. Type is ssr. + * Returns an array of LibreNMS\Device\Sensor objects that have been discovered + * + * @return array Sensors + */ + public function discoverWirelessSsr() + { + $ssr = '.1.3.6.1.4.1.17713.7.12.9.0'; // CAMBIUM-PTP650-MIB::signalStrengthRatio.0 + return array( + new WirelessSensor( + 'ssr', + $this->getDeviceId(), + $ssr, + 'ptp650', + 0, + 'PTP650 Signal Strength Ratio', + null + ) + ); + } +} diff --git a/doc/Developing/os/Wireless-Sensors.md b/doc/Developing/os/Wireless-Sensors.md index 5cecf42707..a22171de70 100644 --- a/doc/Developing/os/Wireless-Sensors.md +++ b/doc/Developing/os/Wireless-Sensors.md @@ -4,22 +4,23 @@ This document will guide you through adding wireless sensors for your new wirele Currently we have support for the following wireless metrics along with the values we expect to see the data in: -| Type | Measurement | Interface | Description | -| ---------------- | ------------- | ----------------------------- | ------------------------------------------------------------ | -| ap-count | % | WirelessApCountDiscovery | The number of APs attached to this controller | -| capacity | % | WirelessCapacityDiscovery | The % of operating rate vs theoretical max | -| ccq | % | WirelessCcqDiscovery | The Client Connection Quality | -| clients | count | WirelessClientsDiscovery | The number of clients connected to/managed by this device | -| distance | km | WirelessDistanceDiscovery | The distance of a radio link in Kilometers | -| error-ratio | % | WirelessErrorRatioDiscovery | The percent of errored packets or bits, etc | -| frequency | MHz | WirelessFrequencyDiscovery | The frequency of the radio in MHz, channels can be converted | -| noise-floor | dBm/Hz | WirelessNoiseFloorDiscovery | The amount of noise received by the radio | -| power | dBm | WirelessPowerDiscovery | The power of transmit or receive, including signal level | -| quality | % | WirelessQualityDiscovery | The % of quality of the link, 100% = perfect link | -| rate | bps | WirelessRateDiscovery | The negotiated rate of the connection (not data transfer) | -| rssi | dBm | WirelessRssiDiscovery | The Received Signal Strength Indicator | -| snr | dBm | WirelessSnrDiscovery | The Signal to Noise ratio, which is signal - noise floor | -| utilization | % | WirelessUtilizationDiscovery | The % of utilization compared to the current rate | +| Type | Measurement | Interface | Description | +| ----------- | ----------- | ---------------------------- | ----------------------------------------------------------------------------------------------- | +| ap-count | % | WirelessApCountDiscovery | The number of APs attached to this controller | +| capacity | % | WirelessCapacityDiscovery | The % of operating rate vs theoretical max | +| ccq | % | WirelessCcqDiscovery | The Client Connection Quality | +| clients | count | WirelessClientsDiscovery | The number of clients connected to/managed by this device | +| distance | km | WirelessDistanceDiscovery | The distance of a radio link in Kilometers | +| error-ratio | % | WirelessErrorRatioDiscovery | The percent of errored packets or bits, etc | +| frequency | MHz | WirelessFrequencyDiscovery | The frequency of the radio in MHz, channels can be converted | +| noise-floor | dBm/Hz | WirelessNoiseFloorDiscovery | The amount of noise received by the radio | +| power | dBm | WirelessPowerDiscovery | The power of transmit or receive, including signal level | +| quality | % | WirelessQualityDiscovery | The % of quality of the link, 100% = perfect link | +| rate | bps | WirelessRateDiscovery | The negotiated rate of the connection (not data transfer) | +| rssi | dBm | WirelessRssiDiscovery | The Received Signal Strength Indicator | +| snr | dBm | WirelessSnrDiscovery | The Signal to Noise ratio, which is signal - noise floor | +| ssr | dBm | WirelessSsrDiscovery | The Signal strength ratio, the ratio(or difference) of Vertical rx power to Horizontal rx power | +| utilization | % | WirelessUtilizationDiscovery | The % of utilization compared to the current rate | You will need to create a new OS class for your os if one doen't exist under `LibreNMS/OS`. The name of this file should be the os name in camel case for example `airos -> Airos`, `ios-wlc -> IosWlc`. diff --git a/html/includes/graphs/device/wireless_ssr.inc.php b/html/includes/graphs/device/wireless_ssr.inc.php new file mode 100644 index 0000000000..5341ba0115 --- /dev/null +++ b/html/includes/graphs/device/wireless_ssr.inc.php @@ -0,0 +1,10 @@ + + * 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. +*/ +use LibreNMS\RRD\RrdDefinition; + +$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'; + } +} elseif ($epmp_ap == 2) { + if ($epmp_number == 4) { + $hardware = 'ePTP Slave'; + } else { + $hardware = 'ePMP SM'; + } +} + +$version = snmp_get($device, 'cambiumCurrentuImageVersion.0', '-Oqv', 'CAMBIUM-PMP80211-MIB'); + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('numTracked', 'GAUGE', 0, 100000) + ->addDataset('numVisible', 'GAUGE', 0, 100000); + $fields = array( + 'numTracked' => $cambiumGPSNumTrackedSat, + 'numVisible' => $cambiumGPSNumVisibleSat + ); + $tags = compact('rrd_def'); + data_update($device, 'cambium-epmp-gps', $tags, $fields); + $graphs['cambium_epmp_gps'] = true; +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('uplinkMCSMode', 'GAUGE', -30, 30) + ->addDataset('downlinkMCSMode', 'GAUGE', -30, 30); + $fields = array( + 'uplinkMCSMode' => $cambiumSTAUplinkMCSMode, + 'downlinkMCSMode' => $cambiumSTADownlinkMCSMode + ); + $tags = compact('rrd_def'); + data_update($device, 'cambium-epmp-modulation', $tags, $fields); + $graphs['cambium_epmp_modulation'] = true; +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('entryAttempt', 'GAUGE', 0, 100000) + ->addDataset('entryAccess', 'GAUGE', 0, 100000) + ->addDataset('authFailure', 'GAUGE', 0, 100000); + $fields = array( + 'entryAttempt' => $sysNetworkEntryAttempt, + 'entryAccess' => $sysNetworkEntrySuccess, + 'authFailure' => $sysNetworkEntryAuthenticationFailure + ); + $tags = compact('rrd_def'); + data_update($device, 'cambium-epmp-access', $tags, $fields); + $graphs['cambium_epmp_access'] = true; +} + + +$multi_get_array = snmp_get_multi($device, "ulWLanTotalAvailableFrameTimePerSecond.0 ulWLanTotalUsedFrameTimePerSecond.0 dlWLanTotalAvailableFrameTimePerSecond.0 dlWLanTotalUsedFrameTimePerSecond.0", "-OQU", "CAMBIUM-PMP80211-MIB"); + +$ulWLanTotalAvailableFrameTimePerSecond = $multi_get_array[0]["CAMBIUM-PMP80211-MIB::ulWLanTotalAvailableFrameTimePerSecond"]; +$ulWLanTotalUsedFrameTimePerSecond = $multi_get_array[0]["CAMBIUM-PMP80211-MIB::ulWLanTotalUsedFrameTimePerSecond"]; +$dlWLanTotalAvailableFrameTimePerSecond = $multi_get_array[0]["CAMBIUM-PMP80211-MIB::dlWLanTotalAvailableFrameTimePerSecond"]; +$dlWLanTotalUsedFrameTimePerSecond = $multi_get_array[0]["CAMBIUM-PMP80211-MIB::dlWLanTotalUsedFrameTimePerSecond"]; + +if (is_numeric($ulWLanTotalAvailableFrameTimePerSecond) && is_numeric($ulWLanTotalUsedFrameTimePerSecond) && is_numeric($ulWLanTotalAvailableFrameTimePerSecond) && is_numeric($ulWLanTotalUsedFrameTimePerSecond)) { + $ulWlanFrameUtilization = round((($ulWLanTotalUsedFrameTimePerSecond/$ulWLanTotalAvailableFrameTimePerSecond)*100), 2); + $dlWlanFrameUtilization = round((($dlWLanTotalUsedFrameTimePerSecond/$dlWLanTotalAvailableFrameTimePerSecond)*100), 2); + d_echo($dlWlanFrameUtilization); + d_echo($ulWlanFrameUtilization); + $rrd_def = RrdDefinition::make() + ->addDataset('ulwlanfrut', 'GAUGE', 0, 100000) + ->addDataset('dlwlanfrut', 'GAUGE', 0, 100000); + $fields = array( + 'ulwlanframeutilization' => $ulWlanFrameUtilization, + 'dlwlanframeutilization' => $dlWlanFrameUtilization + ); + $tags = compact('rrd_def'); + data_update($device, 'cambium-epmp-frameUtilization', $tags, $fields); + $graphs['cambium-epmp-frameUtilization'] = true; +} +unset($multi_get_array, $ulWlanFrameUtilization, $ulWLanTotalAvailableFrameTimePerSecond, $ulWLanTotalUsedFrameTimePerSecond, $dlWlanFrameUtilization, $dlWLanTotalAvailableFrameTimePerSecond, $dlWLanTotalUsedFrameTimePerSecond); diff --git a/includes/polling/os/pmp.inc.php b/includes/polling/os/pmp.inc.php new file mode 100644 index 0000000000..00bad76f6f --- /dev/null +++ b/includes/polling/os/pmp.inc.php @@ -0,0 +1,240 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2017 Paul Heinrichs + * @author Paul Heinrichs + */ + use LibreNMS\RRD\RrdDefinition; + +$cambium_type = $poll_device['sysDescr']; +$PMP = snmp_get($device, 'boxDeviceType.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'); +$version = $cambium_type; + +$filtered_words = array( + 'timing', + 'timeing' +); + +$ptp = array( + 'BHUL450' => 'PTP 450', + 'BHUL' => 'PTP 230', + 'BH20' => 'PTP 100' +); + +// PMP 100 is defaulted to +$pmp = array( + 'MIMO OFDM' => 'PMP 450', + 'OFDM' => 'PMP 430' +); + +foreach ($ptp as $desc => $model) { + if (str_contains($cambium_type, $desc)) { + $hardware = $model; + + if (str_contains($model, 'PTP')) { + $masterSlaveMode = str_replace($filtered_words, "", snmp_get($device, 'bhTimingMode.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB')); + $hardware = $model . ' '. $masterSlaveMode; + $version = snmp_get($device, 'boxDeviceTypeID.0', '-Oqv', 'WHISP-BOX-MIBV2-MIB'); + } + break; + } +} + +if (!isset($hardware)) { + $hardware = 'PMP 100'; + foreach ($pmp as $desc => $model) { + if (str_contains($PMP, $desc)) { + $hardware = $model; + break; + } + } + if (str_contains($hardware, 'PMP')) { + if (str_contains($version, "AP")) { + $hardware .= ' AP'; + } elseif (str_contains($version, "SM")) { + $hardware .= ' SM'; + } + } +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('fecInErrorsCount', 'GAUGE', 0, 100000) + ->addDataset('fecOutErrorsCount', 'GAUGE', 0, 100000); + + $fields = array( + 'fecInErrorsCount' => $fecInErrorsCount, + 'fecOutErrorsCount' => $fecOutErrorsCount, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-errorCount', $tags, $fields); + $graphs['canopy_generic_errorCount'] = true; + unset($rrd_filename, $fecInErrorsCount, $fecOutErrorsCount); +} + +$crcErrors = snmp_get($device, "fecCRCError.0", "-Ovqn", "WHISP-BOX-MIBV2-MIB"); +if (is_numeric($crcErrors)) { + $rrd_def = RrdDefinition::make()->addDataset('crcErrors', 'GAUGE', 0, 100000); + $fields = array( + 'crcErrors' => $crcErrors, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-crcErrors', $tags, $fields); + $graphs['canopy_generic_crcErrors'] = true; + unset($crcErrors); +} + +$jitter = snmp_get($device, "jitter.0", "-Ovqn", "WHISP-SM-MIB"); +if (is_numeric($jitter)) { + $rrd_def = RrdDefinition::make()->addDataset('jitter', 'GAUGE', 0, 20); + $fields = array( + 'jitter' => $jitter, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-jitter', $tags, $fields); + $graphs['canopy_generic_jitter'] = true; + unset($rrd_filename, $jitter); +} + +$multi_get_array = snmp_get_multi($device, "regCount.0 regFailureCount.0", "-OQU", "WHISP-APS-MIB"); +d_echo($multi_get_array); +$registered = $multi_get_array[0]["WHISP-APS-MIB::regCount"]; +$failed = $multi_get_array[0]["WHISP-APS-MIB::regFailureCount"]; + +if (is_numeric($registered) && is_numeric($failed)) { + $rrd_def = RrdDefinition::make() + ->addDataset('regCount', 'GAUGE', 0, 15000) + ->addDataset('failed', 'GAUGE', 0, 15000); + $fields = array( + 'regCount' => $registered, + 'failed' => $failed, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-regCount', $tags, $fields); + $graphs['canopy_generic_regCount'] = true; + unset($rrd_filename, $registered, $failed); +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('visible', 'GAUGE', 0, 1000) + ->addDataset('tracked', 'GAUGE', 0, 1000); + $fields = array( + 'visible' => floatval($visible), + 'tracked' => floatval($tracked), + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-gpsStats', $tags, $fields); + $graphs['canopy_generic_gpsStats'] = true; + unset($rrd_filename, $visible, $tracked); +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('dbm', 'GAUGE', -100, 0) + ->addDataset('min', 'GAUGE', -100, 0) + ->addDataset('max', 'GAUGE', -100, 0) + ->addDataset('avg', 'GAUGE', -100, 0); + + $fields = array( + 'dbm' => $dbmRadio, + 'min' => $minRadio, + 'max' => $maxRadio, + 'avg' => $avgRadio, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-radioDbm', $tags, $fields); + $graphs['canopy_generic_radioDbm'] = true; + unset($rrd_filename, $dbmRadio, $minRadio, $maxRadio, $avgRadio); +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('horizontal', 'GAUGE', -100, 0) + ->addDataset('vertical', 'GAUGE', -100, 0); + $fields = array( + 'horizontal' => $horizontal, + 'vertical' => $vertical, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-450-linkRadioDbm', $tags, $fields); + $graphs['canopy_generic_450_linkRadioDbm'] = true; + unset($rrd_filename, $horizontal, $horizontal); +} + +$lastLevel = str_replace('"', "", snmp_get($device, "lastPowerLevel.2", "-Ovqn", "WHISP-APS-MIB")); +if (is_numeric($lastLevel)) { + $rrd_def = RrdDefinition::make()->addDataset('last', 'GAUGE', -100, 0); + $fields = array( + 'last' => $lastLevel, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-450-powerlevel', $tags, $fields); + $graphs['canopy_generic_450_powerlevel'] = true; + unset($lastLevel); +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('vertical', 'GAUGE', -150, 0) + ->addDataset('horizontal', 'GAUGE', -150, 0) + ->addDataset('combined', 'GAUGE', -150, 0); + $fields = array( + 'vertical' => floatval($vertical), + 'horizontal' => floatval($horizontal), + 'combined' => $combined, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-signalHV', $tags, $fields); + $graphs['canopy_generic_signalHV'] = true; + unset($rrd_filename, $vertical, $horizontal, $combined); +} + +$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)) { + $rrd_def = RrdDefinition::make() + ->addDataset('horizontal', 'GAUGE', -100, 100) + ->addDataset('vertical', 'GAUGE', -100, 100); + + $fields = array( + 'horizontal' => $horizontal, + 'vertical' => $vertical, + ); + $tags = compact('rrd_def'); + data_update($device, 'canopy-generic-450-slaveHV', $tags, $fields); + $graphs['canopy_generic_450_slaveHV'] = true; + unset($rrd_filename, $horizontal, $vertical); +} diff --git a/includes/polling/os/ptp250.inc.php b/includes/polling/os/ptp250.inc.php new file mode 100644 index 0000000000..a2dfe1328a --- /dev/null +++ b/includes/polling/os/ptp250.inc.php @@ -0,0 +1,16 @@ + + * 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. +*/ +use LibreNMS\RRD\RrdDefinition; + +$version = $poll_device['sysDescr']; +$masterSlaveMode = ucfirst(snmp_get($device, 'masterSlaveMode.0', '-Oqv', "CAMBIUM-PTP250-MIB")); +$hardware = 'PTP 250 '. $masterSlaveMode; diff --git a/includes/polling/os/ptp650.inc.php b/includes/polling/os/ptp650.inc.php new file mode 100644 index 0000000000..3c065d69dc --- /dev/null +++ b/includes/polling/os/ptp650.inc.php @@ -0,0 +1,16 @@ + + * 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. +*/ +use LibreNMS\RRD\RrdDefinition; + +$version = $poll_device['sysDescr']; +$masterSlaveMode = ucfirst(snmp_get($device, 'masterSlaveMode.0', '-Oqv', "CAMBIUM-PTP650-MIB")); +$hardware = 'PTP 650 '. $masterSlaveMode; diff --git a/includes/polling/wireless/cambium-250.inc.php b/includes/polling/wireless/cambium-250.inc.php index 8035427aa7..c393eaea0d 100644 --- a/includes/polling/wireless/cambium-250.inc.php +++ b/includes/polling/wireless/cambium-250.inc.php @@ -11,33 +11,34 @@ use LibreNMS\RRD\RrdDefinition; -$transmitPower = snmp_get($device, "transmitPower.0", "-Ovqn", "CAMBIUM-PTP250-MIB"); -if (is_numeric($transmitPower)) { - $rrd_def = RrdDefinition::make()->addDataset('transmitPower', 'GAUGE', 0, 100); - $fields = array( - 'transmitPower' => $transmitPower / 10, - ); +// Implemented +// $transmitPower = snmp_get($device, "transmitPower.0", "-Ovqn", "CAMBIUM-PTP250-MIB"); +// if (is_numeric($transmitPower)) { +// $rrd_def = RrdDefinition::make()->addDataset('transmitPower', 'GAUGE', 0, 100); +// $fields = array( +// 'transmitPower' => $transmitPower / 10, +// ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-250-transmitPower', $tags, $fields); - $graphs['cambium_250_transmitPower'] = true; -} +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-250-transmitPower', $tags, $fields); +// $graphs['cambium_250_transmitPower'] = true; +// } -$receivePower = snmp_get($device, "receivePower.0", "-Ovqn", "CAMBIUM-PTP250-MIB"); -$noiseFloor = snmp_get($device, "noiseFloor.0", "-Ovqn", "CAMBIUM-PTP250-MIB"); -if (is_numeric($receivePower)) { - $rrd_def = RrdDefinition::make() - ->addDataset('receivePower', 'GAUGE', -150, 0) - ->addDataset('noiseFloor', 'GAUGE', -150, 0); - $fields = array( - 'receivePower' => $receivePower / 10, - 'noiseFloor' => $noiseFloor, - ); +// $receivePower = snmp_get($device, "receivePower.0", "-Ovqn", "CAMBIUM-PTP250-MIB"); +// $noiseFloor = snmp_get($device, "noiseFloor.0", "-Ovqn", "CAMBIUM-PTP250-MIB"); +// if (is_numeric($receivePower)) { +// $rrd_def = RrdDefinition::make() +// ->addDataset('receivePower', 'GAUGE', -150, 0) +// ->addDataset('noiseFloor', 'GAUGE', -150, 0); +// $fields = array( +// 'receivePower' => $receivePower / 10, +// 'noiseFloor' => $noiseFloor, +// ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-250-receivePower', $tags, $fields); - $graphs['cambium_250_receivePower'] = true; -} +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-250-receivePower', $tags, $fields); +// $graphs['cambium_250_receivePower'] = true; +// } $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", ""); @@ -55,24 +56,24 @@ if (is_numeric($txModulation) && is_numeric($rxModulation)) { $graphs['cambium_250_modulationMode'] = true; } -$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)) { - $rrd_def = RrdDefinition::make() - ->addDataset('receiveDataRate', 'GAUGE', 0, 10000) - ->addDataset('transmitDataRate', 'GAUGE', 0, 10000) - ->addDataset('aggregateDataRate', 'GAUGE', 0, 10000); - $fields = array( - 'receiveDataRate' => $receiveDataRate / 100, - 'transmitDataRate' => $transmitDataRate / 100, - 'aggregateDataRate' => $aggregateDataRate / 100, - ); +// $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)) { +// $rrd_def = RrdDefinition::make() +// ->addDataset('receiveDataRate', 'GAUGE', 0, 10000) +// ->addDataset('transmitDataRate', 'GAUGE', 0, 10000) +// ->addDataset('aggregateDataRate', 'GAUGE', 0, 10000); +// $fields = array( +// 'receiveDataRate' => $receiveDataRate / 100, +// 'transmitDataRate' => $transmitDataRate / 100, +// 'aggregateDataRate' => $aggregateDataRate / 100, +// ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-250-dataRate', $tags, $fields); - $graphs['cambium_250_dataRate'] = true; -} +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-250-dataRate', $tags, $fields); +// $graphs['cambium_250_dataRate'] = true; +// } $ssr = snmp_get($device, "signalStrengthRatio.0", "-Ovqn", "CAMBIUM-PTP250-MIB"); if (is_numeric($ssr)) { diff --git a/includes/polling/wireless/cambium-650.inc.php b/includes/polling/wireless/cambium-650.inc.php index f3d80bbce2..87ef6db627 100644 --- a/includes/polling/wireless/cambium-650.inc.php +++ b/includes/polling/wireless/cambium-650.inc.php @@ -11,27 +11,27 @@ use LibreNMS\RRD\RrdDefinition; -$transmitPower = snmp_get($device, "transmitPower.0", "-Ovqn", "CAMBIUM-PTP650-MIB"); -if (is_numeric($transmitPower)) { - $rrd_def = RrdDefinition::make()->addDataset('transmitPower', 'GAUGE', 0, 100); - $fields = array( - 'transmitPower' => $transmitPower / 10, - ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-650-transmitPower', $tags, $fields); - $graphs['cambium_650_transmitPower'] = true; -} +// $transmitPower = snmp_get($device, "transmitPower.0", "-Ovqn", "CAMBIUM-PTP650-MIB"); +// if (is_numeric($transmitPower)) { +// $rrd_def = RrdDefinition::make()->addDataset('transmitPower', 'GAUGE', 0, 100); +// $fields = array( +// 'transmitPower' => $transmitPower / 10, +// ); +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-650-transmitPower', $tags, $fields); +// $graphs['cambium_650_transmitPower'] = true; +// } -$rawReceivePower = snmp_get($device, "rawReceivePower.0", "-Ovqn", "CAMBIUM-PTP650-MIB"); -if (is_numeric($rawReceivePower)) { - $rrd_def = RrdDefinition::make()->addDataset('rawReceivePower', 'GAUGE', -100, 0); - $fields = array( - 'rawReceivePower' => $rawReceivePower / 10, - ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-650-rawReceivePower', $tags, $fields); - $graphs['cambium_650_rawReceivePower'] = true; -} +// $rawReceivePower = snmp_get($device, "rawReceivePower.0", "-Ovqn", "CAMBIUM-PTP650-MIB"); +// if (is_numeric($rawReceivePower)) { +// $rrd_def = RrdDefinition::make()->addDataset('rawReceivePower', 'GAUGE', -100, 0); +// $fields = array( +// 'rawReceivePower' => $rawReceivePower / 10, +// ); +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-650-rawReceivePower', $tags, $fields); +// $graphs['cambium_650_rawReceivePower'] = true; +// } $txModulation = snmp_get($device, ".1.3.6.1.4.1.17713.7.12.15.0", "-Ovqn", ""); @@ -49,23 +49,23 @@ if (is_numeric($txModulation) && is_numeric($rxModulation)) { $graphs['cambium_650_modulationMode'] = true; } -$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)) { - $rrd_def = RrdDefinition::make() - ->addDataset('receiveDataRate', 'GAUGE', 0, 10000) - ->addDataset('transmitDataRate', 'GAUGE', 0, 10000) - ->addDataset('aggregateDataRate', 'GAUGE', 0, 10000); - $fields = array( - 'receiveDataRate' => $receiveDataRate / 100, - 'transmitDataRate' => $transmitDataRate / 100, - 'aggregateDataRate' => $aggregateDataRate / 100, - ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-650-dataRate', $tags, $fields); - $graphs['cambium_650_dataRate'] = true; -} +// $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)) { +// $rrd_def = RrdDefinition::make() +// ->addDataset('receiveDataRate', 'GAUGE', 0, 10000) +// ->addDataset('transmitDataRate', 'GAUGE', 0, 10000) +// ->addDataset('aggregateDataRate', 'GAUGE', 0, 10000); +// $fields = array( +// 'receiveDataRate' => $receiveDataRate / 100, +// 'transmitDataRate' => $transmitDataRate / 100, +// 'aggregateDataRate' => $aggregateDataRate / 100, +// ); +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-650-dataRate', $tags, $fields); +// $graphs['cambium_650_dataRate'] = true; +// } $ssr = snmp_get($device, "signalStrengthRatio.0", "-Ovqn", "CAMBIUM-PTP650-MIB"); if (is_numeric($ssr)) { @@ -78,34 +78,34 @@ if (is_numeric($ssr)) { $graphs['cambium_650_ssr'] = true; } -$gps = snmp_get($device, "tDDSynchronizationStatus.0", "-Ovqn", "CAMBIUM-PTP650-MIB"); -if ($gps == 'locked') { - $gps = 0; -} elseif ($gps == 'holdover') { - $gps = 1; -} elseif ($gps == 'holdoverNoGPSSyncIn') { - $gps = 2; -} elseif ($gps == 'notSynchronized') { - $gps = 3; -} elseif ($gps == 'notSynchronizedNoGPSSyncIn') { - $gps = 4; -} elseif ($gps == 'pTPSYNCNotConnected') { - $gps = 5; -} elseif ($gps == 'initialising') { - $gps = 6; -} elseif ($gps == 'clusterTimingMaster') { - $gps = 7; -} elseif ($gps == 'acquiringLock') { - $gps = 8; -} elseif ($gps == 'inactive') { - $gps = 9; -} -if (is_numeric($gps)) { - $rrd_def = RrdDefinition::make()->addDataset('gps', 'GAUGE', 0, 10); - $fields = array( - 'gps' => $gps, - ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-650-gps', $tags, $fields); - $graphs['cambium_650_gps'] = true; -} +// $gps = snmp_get($device, "tDDSynchronizationStatus.0", "-Ovqn", "CAMBIUM-PTP650-MIB"); +// if ($gps == 'locked') { +// $gps = 0; +// } elseif ($gps == 'holdover') { +// $gps = 1; +// } elseif ($gps == 'holdoverNoGPSSyncIn') { +// $gps = 2; +// } elseif ($gps == 'notSynchronized') { +// $gps = 3; +// } elseif ($gps == 'notSynchronizedNoGPSSyncIn') { +// $gps = 4; +// } elseif ($gps == 'pTPSYNCNotConnected') { +// $gps = 5; +// } elseif ($gps == 'initialising') { +// $gps = 6; +// } elseif ($gps == 'clusterTimingMaster') { +// $gps = 7; +// } elseif ($gps == 'acquiringLock') { +// $gps = 8; +// } elseif ($gps == 'inactive') { +// $gps = 9; +// } +// if (is_numeric($gps)) { +// $rrd_def = RrdDefinition::make()->addDataset('gps', 'GAUGE', 0, 10); +// $fields = array( +// 'gps' => $gps, +// ); +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-650-gps', $tags, $fields); +// $graphs['cambium_650_gps'] = true; +// } diff --git a/includes/polling/wireless/cambium-epmp.inc.php b/includes/polling/wireless/cambium-epmp.inc.php index fa11c9b2a1..d22d2bc1f6 100644 --- a/includes/polling/wireless/cambium-epmp.inc.php +++ b/includes/polling/wireless/cambium-epmp.inc.php @@ -8,20 +8,20 @@ */ use LibreNMS\RRD\RrdDefinition; -$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)) { - $rrd_def = RrdDefinition::make() - ->addDataset('cambiumSTADLRSSI', 'GAUGE', -150, 0) - ->addDataset('cambiumSTADLSNR', 'GAUGE', 0, 150); - $fields = array( - 'cambiumSTADLRSSI' => $cambiumSTADLRSSI, - 'cambiumSTADLSNR' => $cambiumSTADLSNR - ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-epmp-RFStatus', $tags, $fields); - $graphs['cambium_epmp_RFStatus'] = true; -} +// $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)) { +// $rrd_def = RrdDefinition::make() +// ->addDataset('cambiumSTADLRSSI', 'GAUGE', -150, 0) +// ->addDataset('cambiumSTADLSNR', 'GAUGE', 0, 150); +// $fields = array( +// 'cambiumSTADLRSSI' => $cambiumSTADLRSSI, +// 'cambiumSTADLSNR' => $cambiumSTADLSNR +// ); +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-epmp-RFStatus', $tags, $fields); +// $graphs['cambium_epmp_RFStatus'] = true; +// } $cambiumGPSNumTrackedSat = snmp_get($device, "cambiumGPSNumTrackedSat.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); $cambiumGPSNumVisibleSat = snmp_get($device, "cambiumGPSNumVisibleSat.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); @@ -53,16 +53,16 @@ if (is_numeric($cambiumSTAUplinkMCSMode) && is_numeric($cambiumSTADownlinkMCSMod $graphs['cambium_epmp_modulation'] = true; } -$registeredSM = snmp_get($device, "cambiumAPNumberOfConnectedSTA.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); -if (is_numeric($registeredSM)) { - $rrd_def = RrdDefinition::make()->addDataset('regSM', 'GAUGE', 0, 10000); - $fields = array( - 'regSM' => $registeredSM, - ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-epmp-registeredSM', $tags, $fields); - $graphs['cambium_epmp_registeredSM'] = true; -} +// $registeredSM = snmp_get($device, "cambiumAPNumberOfConnectedSTA.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); +// if (is_numeric($registeredSM)) { +// $rrd_def = RrdDefinition::make()->addDataset('regSM', 'GAUGE', 0, 10000); +// $fields = array( +// 'regSM' => $registeredSM, +// ); +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-epmp-registeredSM', $tags, $fields); +// $graphs['cambium_epmp_registeredSM'] = true; +// } $sysNetworkEntryAttempt = snmp_get($device, "sysNetworkEntryAttempt.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); $sysNetworkEntrySuccess = snmp_get($device, "sysNetworkEntrySuccess.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); @@ -93,16 +93,16 @@ if (is_numeric($gpsSync)) { $graphs['cambium_epmp_gpsSync'] = true; } -$freq = snmp_get($device, "cambiumSTAConnectedRFFrequency.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); -if (is_numeric($freq)) { - $rrd_def = RrdDefinition::make()->addDataset('freq', 'GAUGE', 0, 100000); - $fields = array( - 'freq' => $freq, - ); - $tags = compact('rrd_def'); - data_update($device, 'cambium-epmp-freq', $tags, $fields); - $graphs['cambium_epmp_freq'] = true; -} +// $freq = snmp_get($device, "cambiumSTAConnectedRFFrequency.0", "-Ovqn", "CAMBIUM-PMP80211-MIB"); +// if (is_numeric($freq)) { +// $rrd_def = RrdDefinition::make()->addDataset('freq', 'GAUGE', 0, 100000); +// $fields = array( +// 'freq' => $freq, +// ); +// $tags = compact('rrd_def'); +// data_update($device, 'cambium-epmp-freq', $tags, $fields); +// $graphs['cambium_epmp_freq'] = true; +// } $multi_get_array = snmp_get_multi($device, "ulWLanTotalAvailableFrameTimePerSecond.0 ulWLanTotalUsedFrameTimePerSecond.0 dlWLanTotalAvailableFrameTimePerSecond.0 dlWLanTotalUsedFrameTimePerSecond.0", "-OQU", "CAMBIUM-PMP80211-MIB"); diff --git a/includes/polling/wireless/canopy-generic.inc.php b/includes/polling/wireless/canopy-generic.inc.php index 956b662b6d..3e93779c96 100644 --- a/includes/polling/wireless/canopy-generic.inc.php +++ b/includes/polling/wireless/canopy-generic.inc.php @@ -58,17 +58,18 @@ if (strstr($hardware, 'CMM') == false) { unset($rrd_filename, $vertical, $horizontal, $combined); } - $rssi = snmp_get($device, "1.3.6.1.4.1.161.19.3.2.2.2.0", "-Ovqn", ""); - if (is_numeric($rssi)) { - $rrd_def = RrdDefinition::make()->addDataset('rssi', 'GAUGE', 0, 5000); - $fields = array( - 'rssi' => $rssi, - ); - $tags = compact('rrd_def'); - data_update($device, 'canopy-generic-rssi', $tags, $fields); - $graphs['canopy_generic_rssi'] = true; - unset($rrd_filename, $rssi); - } + // Implemented + // $rssi = snmp_get($device, "1.3.6.1.4.1.161.19.3.2.2.2.0", "-Ovqn", ""); + // if (is_numeric($rssi)) { + // $rrd_def = RrdDefinition::make()->addDataset('rssi', 'GAUGE', 0, 5000); + // $fields = array( + // 'rssi' => $rssi, + // ); + // $tags = compact('rrd_def'); + // data_update($device, 'canopy-generic-rssi', $tags, $fields); + // $graphs['canopy_generic_rssi'] = true; + // unset($rrd_filename, $rssi); + // } $jitter = snmp_get($device, "jitter.0", "-Ovqn", "WHISP-SM-MIB"); if (is_numeric($jitter)) { @@ -127,26 +128,27 @@ if (strstr($hardware, 'CMM') == false) { unset($rrd_filename, $horizontal, $vertical); } } - +// Convert to: https://docs.librenms.org/#Developing/Sensor-State-Support/ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware, 'CMM')) { - $gpsStatus = snmp_get($device, "whispGPSStats.0", "-Ovqn", "WHISP-APS-MIB"); - if ($gpsStatus == 'generatingSync') { - $gpsStatus = 3; - } elseif ($gpsStatus == 'gpsLostSync') { - $gpsStatus = 2; - } elseif ($gpsStatus == 'gpsSynchronized') { - $gpsStatus = 1; - } - if (is_numeric($gpsStatus)) { - $rrd_def = RrdDefinition::make()->addDataset('whispGPSStats', 'GAUGE', 0, 4); - $fields = array( - 'whispGPSStats' => $gpsStatus, - ); - $tags = compact('rrd_def'); - data_update($device, 'canopy-generic-whispGPSStats', $tags, $fields); - $graphs['canopy_generic_whispGPSStats'] = true; - unset($rrd_filename, $gpsStatus); - } + // Implemented + // $gpsStatus = snmp_get($device, "whispGPSStats.0", "-Ovqn", "WHISP-APS-MIB"); + // if ($gpsStatus == 'generatingSync') { + // $gpsStatus = 3; + // } elseif ($gpsStatus == 'gpsLostSync') { + // $gpsStatus = 2; + // } elseif ($gpsStatus == 'gpsSynchronized') { + // $gpsStatus = 1; + // } + // if (is_numeric($gpsStatus)) { + // $rrd_def = RrdDefinition::make()->addDataset('whispGPSStats', 'GAUGE', 0, 4); + // $fields = array( + // 'whispGPSStats' => $gpsStatus, + // ); + // $tags = compact('rrd_def'); + // data_update($device, 'canopy-generic-whispGPSStats', $tags, $fields); + // $graphs['canopy_generic_whispGPSStats'] = true; + // unset($rrd_filename, $gpsStatus); + // } $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", "")); @@ -193,22 +195,23 @@ if (strstr($version, 'AP') == false) { $graphs['canopy_generic_450_powerlevel'] = true; unset($lastLevel); } + + // Implemented + // $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)) { + // $rrd_def = RrdDefinition::m // ->addDataset('horizontal', 'GAUGE', 0, 100)ake() - $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)) { - $rrd_def = RrdDefinition::make() - ->addDataset('horizontal', 'GAUGE', 0, 100) - ->addDataset('vertical', 'GAUGE', 0, 100); - $fields = array( - 'horizontal' => $horizontal, - 'vertical' => $vertical, - ); - $tags = compact('rrd_def'); - data_update($device, 'canopy-generic-450-ptpSNR', $tags, $fields); - $graphs['canopy_generic_450_ptpSNR'] = true; - unset($rrd_filename, $horizontal, $horizontal); - } + // ->addDataset('vertical', 'GAUGE', 0, 100); + // $fields = array( + // 'horizontal' => $horizontal, + // 'vertical' => $vertical, + // ); + // $tags = compact('rrd_def'); + // data_update($device, 'canopy-generic-450-ptpSNR', $tags, $fields); + // $graphs['canopy_generic_450_ptpSNR'] = true; + // unset($rrd_filename, $horizontal, $horizontal); + // } $ssr = str_replace('"', "", snmp_get($device, "linkSignalStrengthRatio.2", "-Ovqn", "WHISP-APS-MIB")); if (is_numeric($ssr)) { @@ -273,33 +276,35 @@ if (strstr($version, 'AP')) { unset($rrd_filename, $registered, $failed); } - if (is_numeric($freq)) { - $rrd_def = RrdDefinition::make()->addDataset('freq', 'GAUGE', 0, 100000); - if ($freq > 99999) { - $freq = $freq / 100000; - } else { - $freq = $freq / 10000; - } - $fields = array( - 'freq' => $freq, - ); - $tags = compact('rrd_def'); - data_update($device, 'canopy-generic-freq', $tags, $fields); - $graphs['canopy_generic_freq'] = true; - unset($rrd_filename, $freq); - } + // Implemented + // if (is_numeric($freq)) { + // $rrd_def = RrdDefinition::make()->addDataset('freq', 'GAUGE', 0, 100000); + // if ($freq > 99999) { + // $freq = $freq / 100000; + // } else { + // $freq = $freq / 10000; + // } + // $fields = array( + // 'freq' => $freq, + // ); + // $tags = compact('rrd_def'); + // data_update($device, 'canopy-generic-freq', $tags, $fields); + // $graphs['canopy_generic_freq'] = true; + // unset($rrd_filename, $freq); + // } - if (is_numeric($downlinkutilization) && is_numeric($uplinkutilization)) { - $rrd_def = RrdDefinition::make() - ->addDataset('downlinkutilization', 'GAUGE', 0, 15000) - ->addDataset('uplinkutilization', 'GAUGE', 0, 15000); - $fields = array( - 'downlinkutilization' => $downlinkutilization, - 'uplinkutilization' => $uplinkutilization, - ); - $tags = compact('rrd_def'); - data_update($device, 'canopy-generic-frameUtilization', $tags, $fields); - $graphs['canopy-generic-frameUtilization'] = true; - unset($rrd_filename, $downlinkutilization, $uplinkutilization); - } + // implemented + // if (is_numeric($downlinkutilization) && is_numeric($uplinkutilization)) { + // $rrd_def = RrdDefinition::make() + // ->addDataset('downlinkutilization', 'GAUGE', 0, 15000) + // ->addDataset('uplinkutilization', 'GAUGE', 0, 15000); + // $fields = array( + // 'downlinkutilization' => $downlinkutilization, + // 'uplinkutilization' => $uplinkutilization, + // ); + // $tags = compact('rrd_def'); + // data_update($device, 'canopy-generic-frameUtilization', $tags, $fields); + // $graphs['canopy-generic-frameUtilization'] = true; + // unset($rrd_filename, $downlinkutilization, $uplinkutilization); + // } } diff --git a/mibs/cambium/CMM3-MIB.txt b/mibs/cambium/CMM3-MIB.txt new file mode 100644 index 0000000000..15548c2ed0 --- /dev/null +++ b/mibs/cambium/CMM3-MIB.txt @@ -0,0 +1,2171 @@ + +-- +-- cmm3-mib.txt +-- +-- ******************************************************************** +-- Copyright 2003-2012 (c), Cambium Networks +-- Cambium Networks Confidential Proprietary +-- ******************************************************************** +-- +-- Canopy CMM3 MIB definitions. +-- +-- ******************************************************************** +-- $Id: ui_db.cmm.xml,v 1.48 2012/01/09 19:31:18 aschnei2 Exp $ +-- +-- Revision History: +-- +--