This week has been busy with the company's wireless network, and other technicians to install Wlc,ap,ise, configure the CA, switch, ha and so on. There are some problems with this process, such as the previous WLC was not configured with agressive load balance, and the result is that some APs are overloaded, and an AP connects 40 users causing the speed to be extremely slow. To prevent a similar problem from recurring, the boss asked me to add the ability to monitor the AP connection to the Nagios system.
A brief introduction to the company's wireless network environment, we are using Cisco devices. 2 Wireless Controllers (WLCS) HA,WLC each other with approximately 50 AP access points, with different SSIDs for certificate and AD authentication and authorization through Cisco ISE.
After testing, the AP is already connected to the WLC, so I do not allow SNMP queries directly to the AP device. All SNMP queries need to be fetched from the WLC. The MIB of the WLC can be downloaded from here or queried on the Cisco official website.
Http://www.oidview.com/mibs/14179/AIRESPACE-SWITCHING-MIB.html
Http://www.oidview.com/mibs/14179/AIRESPACE-WIRELESS-MIB.html
Http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?objectInput=1.3.6.1.4.1.14179.2.2.1.1.3&translate= Translate&submitvalue=submit
For my requirements, the most important information is 2, get the OID of the AP and the OID of the number of client connections he corresponds to
The number of connections for the client corresponds to the OID as shown below
1.3.6.1.4.1.14179.2.2.13.1.4
For example, I executed snmpwalk on the Nagios server (CentOS 7) with the following results
snmpwalk -v 2c -o x -c public 10.2.1.17 1.3.6.1.4.1.14179.2.2.13.1.4snmpv2-smi::enterprises.14179.2.2.13.1.4.24.139.157.244.252.208.0 = integer: 3snmpv2-smi::enterprises.14179.2.2.13.1.4.24.139.157.244.252.208.1 = integer: 19snmpv2-smi::enterprises.14179.2.2.13.1.4.24.156.93.48.115.96.0 = integer: 2snmpv2-smi:: Enterprises.14179.2.2.13.1.4.24.156.93.48.115.96.1 = integer: 4snmpv2-smi:: Enterprises.14179.2.2.13.1.4.24.156.93.48.139.48.0 = integer: 2snmpv2-smi:: Enterprises.14179.2.2.13.1.4.24.156.93.48.139.48.1 = integer: 15snmpv2-smi:: Enterprises.14179.2.2.13.1.4.24.156.93.108.13.0.0 = integer: 1snmpv2-smi:: Enterprises.14179.2.2.13.1.4.24.156.93.108.13.0.1 = integer: 3snmpv2-smi:: Enterprises.14179.2.2.13.1.4.84.162.116.28.209.240.0 = integer: 1snmpv2-smi:: Enterprises.14179.2.2.13.1.4.84.162.116.28.209.240.1 = integer: 3snmpv2-smi::enterprises.14179.2.2.13.1.4.88.10.32.13.204.224.0 = integer: 0snmpv2-smi::enterprises.14179.2.2.13.1.4.88.10.32.13.204.224.1 = integer: 4snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.7.198.240.0 = integer: 1snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.7.198.240.1 = integer: 6snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.12.130.192.0 = integer: 5snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.12.130.192.1 = integer: 5snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.12.183.144.0 = integer: 0snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.12.183.144.1 = integer: 6snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.12.197.80.0 = integer: 1snmpv2-smi:: Enterprises.14179.2.2.13.1.4.88.151.189.12.197.80.1 = integer: 11snmpv2-smi:: enterprises.14179.2.2.13.1.4.88.151.189.12.197.240.0 = integer: 1snmpv2-smi::enterprises.14179.2.2.13.1.4.88.151.189.12.197.240.1 = integer: 7
The middle of the big string from the back of the 14179.2.2.13.1.4 to represent the address of the AP, note that some APS appear two addresses, respectively, 0 and 1 end, this is because the AP can work under two radio 802.11a/n/ac and 802.11/b/g/n, If we add the two values of an AP, we get the total number of connections, and this number is the same as seen under the WLC image interface.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/0A/wKiom1XygYui9rh8AAZJGAAHzaU613.jpg "title=" A1. PNG "alt=" Wkiom1xygyui9rh8aazjgaahzau613.jpg "/>
Knowing the fundamentals, okay, can start to configure. The configuration of the beans is mainly referenced in this script. Can be downloaded, according to their actual situation to modify. The script itself is very simple, here is not to repeat.
Https://exchange.icinga.org/inventory/Check-Plugins/Network/Cisco-AP-Client-number
Test whether it works, query the AP with code 15, show AP name and number of connections
[Email protected] libexec]#/check_ap.pl 10.2.1.17 public 2c 15OK: "SYDLMAP2-P1"-Number of Clients:7 | Clients:7;10;15;0;25
Add a command on Nagios
Define Command{command_name check_ap_clientscommand_line/usr/local/nagios/libexec/check_ap.pl 10.2.1.17 public 2c $ arg1$ 15 20}
Define a host
define host{ use generic-ap ; Inherit default values from a template host_name SYDL3AP8 ; the name we ' re giving to this switch alias SYDL3AP8 ; A longer name associated with the switch address 10.2.1.166 ; ip address of the switch hostgroups ap ; Host groups this switch is associated with parents DDBSYD6509 }
Define a service
define service { use generic-service host sydl3ap8 servicegroups network-services service_ description ap client information check_interval 5 check_command check_ ap_clients!}
Restart the Nagios service to see how the results
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/08/wKioL1Xyhy_RX2zKAAFJ9wEGiDs064.jpg "title=" A2. PNG "alt=" Wkiol1xyhy_rx2zkaafj9wegids064.jpg "/>
Success!
Resources:
Https://supportforums.cisco.com/document/9869811/cisco-wlc-snmp-historical-user-statistics-monitoring-w-syslog-or-splunk
Http://awesomeadmin.blogspot.com.au/2009/11/monitoring-cisco-wireless-controller.html
This article is from the "Mapo Tofu" blog, please be sure to keep this source http://beanxyz.blog.51cto.com/5570417/1693840
Nagios monitors the number of AP clients