Files
librenms-librenms/LibreNMS/OS/Ciscowlc.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

252 lines
9.0 KiB
PHP
Raw Normal View History

feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
<?php
/**
* Ciscowlc.php
*
* Cisco Wireless LAN Controller
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
*
* @link https://www.librenms.org
2021-09-10 20:09:53 +02:00
*
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
* @copyright 2017 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
namespace LibreNMS\OS;
use App\Models\AccessPoint;
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
use LibreNMS\Device\WirelessSensor;
use LibreNMS\Interfaces\Data\DataStorageInterface;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessApCountDiscovery;
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
use LibreNMS\Interfaces\Polling\OSPolling;
use LibreNMS\OS\Shared\Cisco;
use LibreNMS\RRD\RrdDefinition;
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
use SnmpQuery;
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
class Ciscowlc extends Cisco implements
OSPolling,
WirelessClientsDiscovery,
WirelessApCountDiscovery
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
{
public function pollOS(DataStorageInterface $datastore): void
{
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
if (! $this->getDevice()->wirelessSensors()->where('sensor_class', 'ap-count')->exists()) {
return; // if ap count doesn't exist, skip this polling TODO replace with wireless controller module
}
$device = $this->getDeviceArray();
$apNames = \SnmpQuery::enumStrings()->walk('AIRESPACE-WIRELESS-MIB::bsnAPName')->table(1);
$radios = \SnmpQuery::enumStrings()->walk('AIRESPACE-WIRELESS-MIB::bsnAPIfTable')->table(2);
\SnmpQuery::walk('AIRESPACE-WIRELESS-MIB::bsnAPIfLoadChannelUtilization')->table(2, $radios);
$interferences = \SnmpQuery::walk('AIRESPACE-WIRELESS-MIB::bsnAPIfInterferencePower')->table(3);
$numAccessPoints = count($apNames);
$numClients = 0;
foreach ($radios as $radio) {
foreach ($radio as $slot) {
$numClients += $slot['AIRESPACE-WIRELESS-MIB::bsnApIfNoOfUsers'] ?? 0;
}
}
$rrd_def = RrdDefinition::make()
->addDataset('NUMAPS', 'GAUGE', 0, 12500000000)
->addDataset('NUMCLIENTS', 'GAUGE', 0, 12500000000);
$fields = [
'NUMAPS' => $numAccessPoints,
'NUMCLIENTS' => $numClients,
];
$tags = compact('rrd_def');
$datastore->put($device, 'ciscowlc', $tags, $fields);
$db_aps = $this->getDevice()->accessPoints->keyBy->getCompositeKey();
$valid_ap_ids = [];
foreach ($radios as $mac => $radio) {
foreach ($radio as $slot => $value) {
$channel = str_replace('ch', '', $value['AIRESPACE-WIRELESS-MIB::bsnAPIfPhyChannelNumber'] ?? '');
$ap = new AccessPoint([
'device_id' => $this->getDeviceId(),
'name' => $apNames[$mac]['AIRESPACE-WIRELESS-MIB::bsnAPName'] ?? '',
'radio_number' => $slot,
'type' => $value['AIRESPACE-WIRELESS-MIB::bsnAPIfType'] ?? '',
'mac_addr' => $mac,
'channel' => $channel,
'txpow' => $value['AIRESPACE-WIRELESS-MIB::bsnAPIfPhyTxPowerLevel'] ?? 0,
'radioutil' => $value['AIRESPACE-WIRELESS-MIB::bsnAPIfLoadChannelUtilization'] ?? 0,
'numasoclients' => $value['AIRESPACE-WIRELESS-MIB::bsnApIfNoOfUsers'] ?? 0,
'nummonclients' => 0,
'nummonbssid' => 0,
'interference' => 128 + ($interferences[$mac][$slot][$channel]['AIRESPACE-WIRELESS-MIB::bsnAPIfInterferencePower'] ?? -128), // why are we adding 128?
]);
d_echo($ap->toArray());
// if there is a numeric channel, assume the rest of the data is valid, I guess
if (! is_numeric($channel)) {
continue;
}
$rrd_def = RrdDefinition::make()
->addDataset('channel', 'GAUGE', 0, 200)
->addDataset('txpow', 'GAUGE', 0, 200)
->addDataset('radioutil', 'GAUGE', 0, 100)
->addDataset('nummonclients', 'GAUGE', 0, 500)
->addDataset('nummonbssid', 'GAUGE', 0, 200)
->addDataset('numasoclients', 'GAUGE', 0, 500)
->addDataset('interference', 'GAUGE', 0, 2000);
$datastore->put($device, 'arubaap', [
'name' => $ap->name,
'radionum' => $ap->radio_number,
'rrd_name' => ['arubaap', $ap->name . $ap->radio_number],
'rrd_def' => $rrd_def,
], $ap->only([
'channel',
'txpow',
'radioutil',
'nummonclients',
'nummonbssid',
'numasoclients',
'interference',
]));
/** @var AccessPoint $db_ap */
if ($db_ap = $db_aps->get($ap->getCompositeKey())) {
$ap = $db_ap->fill($ap->getAttributes());
}
$ap->save(); // persist ap
$valid_ap_ids[] = $ap->accesspoint_id;
}
}
// delete invalid aps
$this->getDevice()->accessPoints->whereNotIn('accesspoint_id', $valid_ap_ids)->each->delete();
}
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
/**
* 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()
{
$counts = $this->getCacheByIndex('bsnDot11EssNumberOfMobileStations', 'AIRESPACE-WIRELESS-MIB');
if (empty($counts)) {
return []; // no counts to be had
}
$ssids = $this->getCacheByIndex('bsnDot11EssSsid', 'AIRESPACE-WIRELESS-MIB');
if (empty($ssids)) {
// Try to check the LWAPP mib
$ssids = $this->getCacheByIndex('cLWlanSsid', 'CISCO-LWAPP-WLAN-MIB');
}
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
$sensors = [];
$total_oids = [];
$total = 0;
foreach ($counts as $index => $count) {
$oid = '.1.3.6.1.4.1.14179.2.1.1.1.38.' . $index;
$total_oids[] = $oid;
$total += $count;
$sensors[] = new WirelessSensor(
'clients',
$this->getDeviceId(),
$oid,
'ciscowlc-ssid',
$index,
'SSID: ' . $ssids[$index],
$count
);
}
$sensors[] = new WirelessSensor(
'clients',
$this->getDeviceId(),
$total_oids,
'ciscowlc',
0,
'Clients: Total',
$total
);
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
return $sensors;
}
/**
* Discover wireless capacity. This is a percent. Type is capacity.
* Returns an array of LibreNMS\Device\Sensor objects that have been discovered
*
* @return array Sensors
*/
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
public function discoverWirelessApCount(): array
{
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
$data = SnmpQuery::get([
'CISCO-LWAPP-SYS-MIB::clsSysApConnectCount.0',
'AIRESPACE-SWITCHING-MIB::agentInventoryMaxNumberOfAPsSupported.0',
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
'CISCO-LWAPP-AP-MIB::cLApGlobalAPConnectCount.0',
'CISCO-LWAPP-AP-MIB::cLApGlobalMaxApsSupported.0',
])->values();
if (isset($data['CISCO-LWAPP-AP-MIB::cLApGlobalAPConnectCount.0'])) {
return [
new WirelessSensor(
'ap-count',
$this->getDeviceId(),
'.1.3.6.1.4.1.9.9.513.1.3.35.0',
'ciscowlc',
0,
'Connected APs',
$data['CISCO-LWAPP-AP-MIB::cLApGlobalAPConnectCount.0'],
1,
1,
'sum',
null,
$data['CISCO-LWAPP-AP-MIB::cLApGlobalMaxApsSupported.0'],
0
),
];
}
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
if (isset($data['CISCO-LWAPP-SYS-MIB::clsSysApConnectCount.0'])) {
return [
new WirelessSensor(
'ap-count',
$this->getDeviceId(),
'.1.3.6.1.4.1.9.9.618.1.8.4.0',
'ciscowlc',
0,
'Connected APs',
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
$data['CISCO-LWAPP-SYS-MIB::clsSysApConnectCount.0'],
1,
1,
'sum',
null,
Cisco C9800 Wireless Controller AP Count Support (#16342) * Update CISCO-LWAPP-TC-MIB Uploaded latest version from Cisco Feature Navigator From the original Cisco MIB: Deleted duplicate END in line 868 Change the names “dot11_6ghz” and “dot11_xor_5_6ghz” by removing the underscore (example: “dot11-6ghz” “dot11-xor-5-6ghz”) * Update Iosxe.php Added Wireless Controller module * Update iosxe.yaml Added AP count and Wireless Client Credit to @AllanHahn * Create iosxewlc.yaml Added IOS-XE WLC. Need to add sysObjectID for the future devices beyond WLC9800. System description has IOS-XE in it * Update iosxe.yaml * Update iosxe.yaml WLC 9800 not included, have own YAML file * Create iosxewlc.php * Update Iosxe.php Remove WLC Module * Rename iosxewlc.php to Iosxewlc.php * C9800 WLC detection * Update iosxewlc.yaml * Remove CiscoWLC notes * Remove ISIS * Update Iosxewlc.php * Fix syntax * Remove Cisco WLC notes Need some cleanup since already created new PHP file for Cisco IOS-XE WLC * Update Iosxewlc.php * Update CISCO-LWAPP-AP-MIB Downloaded the latest from Cisco MIBS to support AP count for Cisco WLC C9800 models. * Update Copyright * Change type from network to wireless * Patterned with AirOS Cisco WLC * Create iosxewlc_c9800.snmprec Added test file * styleci compliance * styleci compliance * styleci compliance * Uploaded data from actual device * styleci compliance * styleci compliance - remove space * Merge iosxe and iosxewlc As discussed * Merhe iosxewlc.yaml to iosxe.yaml No over graphs for Number of Clients and AP Count or IOSXE WLCs but still can view via Tabs * remove iosxewlc.yaml Covered by iosxe.yaml * Delete iosxewlc.php Covered by iosxe.php * Rename iosxewlc_c9800.snmprec to iosxe_c9800.snmprec due to removal of iosxewlc template which was merged. * styleci compliance * styleci compliance * Update iosxe_c9800.snmprec * Update iosxe_c9800.snmprec * rerun-tests * Remove pollOS block from Iosxe * Check before polling and add additional IP discovery * lint fix * Added raw data from actual device Convert sensitive data to <private> * Create iosxe_c9800.json --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-09-06 23:36:44 +08:00
$data['AIRESPACE-SWITCHING-MIB::agentInventoryMaxNumberOfAPsSupported.0'],
0
),
];
}
return [];
}
feature: Wireless Sensors Overhaul (#6471) * feature: Wireless Sensors Includes client counts for ios and unifi Graphing could use some improvement. Alerting and threshold ui not implemented WIP: starting OO based wireless sensors. Class based functionality working remove old functional files add schema file discovery needs to be enabled, not polling fix up schema fix Unifi discovery not returning an array Add some debug when discovering a sensor. Fix style. Add missing semicolin Add a null object (Generic) for OS. Fill out some phpdocs Re-organized code Each sensor type now has it's own discovery and polling interface Custom polling tested with Unifi CCQ Left to do: Implement UI (Graphs and Custom thresholds) Alerting Testing Fix event message text Remove runDiscovery and runPolling from OS, they are unused and don't belong there. Cleanups/docs Missed this file. Remove the requirement to fetch the current value to check validity. Do that automatically if current is not specified A few cleanups here and there First pass at graphing. device_ and wireless_ graphs added. Add RouterOS support Singleton OS instance isn't required right now. Remove that to allow some memory to be freed. Add wireless to the device list metrics. Make all metrics clickable Tweak graphs a bit Implement limit configuration page. Use sensors page as common code instead of duplicating. Clean up some javascript interactions: Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value. Add some wireless alert rules to the library. Add documentation. Add unifi client counts by ssid in addition to radio. Optimize Sensor polling a bit. Add HP MSM clients support (for full controller) Fix function accessibility Formalize the discovery and poller interfaces. Add Xirrus clients and noise floor move module interfaces to a more appropriate place. push caching code up to os, unsure about this do to the limitations No point in selectively enabling wireless discovery. We only discover if the device supports something. Add RSSI, Power, and Rate. Add these sensors for Ubnt Airos. Clean up some copyrights. Reduce the amount of files need to add new types. Leave graph files for consistency and to allow customization. Remove the old wifi clients graph completely. ciscowlc should have improved counts (total and per-ssid) Schema didn't get added. Impelement the rest of the AirOS sensors Reformat and re-organize the Airos.php class. Add several UBNT AirFiber sensors A few fixes add links to the section headers Add HP MSM mibs. * Schema file got dropped in rebase. * Add wireless menu to view sensors across all devices. Icons in the menu need help :/ * Add HeliOS, Mimosa, and Siklu support Sensors added SNR + Noise * Add power and utilization to Unifi * Update polling to prefetch all sensor data in a few snmp requests as possible * Add Extendair: tx+rx power, aggregate rate, frequency * Add a check for duplicate sensors in discovery. Just print an error for now. * Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed) Fix an incorrect link in the wireless sensors table * Add error rate and change all bps and Hz to use si units * Fixes to limits and frequency display * Fix overview graph frequency display A few decimal place tweaks * Don't allow switching sensor and wireless-sensor graphs, it doesn't work. Change individual distance graphs to use si units * Go through the OS and make sure I got all the sensors I can (probably missed some still) Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS. Message to help developers adding supports that don't return an array from discover functions. * Fix some issues * Remove noise and signal for now at least A couple more fixes Add a notification * Oopsie * Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
}