mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Cisco WLC: fetch LWAPP SSIDs for client counts (#15531)
* Cisco WLC: fetch LWAPP SSIDs * Apply fixes from StyleCI * no need to check twice --------- Co-authored-by: StyleCI Bot <[email protected]>
This commit is contained in:
co-authored by
StyleCI Bot
parent
dde970ddcf
commit
b9881bbf36
+18
-12
@@ -143,8 +143,16 @@ class Ciscowlc extends Cisco implements
|
||||
*/
|
||||
public function discoverWirelessClients()
|
||||
{
|
||||
$ssids = $this->getCacheByIndex('bsnDot11EssSsid', 'AIRESPACE-WIRELESS-MIB');
|
||||
$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');
|
||||
}
|
||||
|
||||
$sensors = [];
|
||||
$total_oids = [];
|
||||
@@ -165,17 +173,15 @@ class Ciscowlc extends Cisco implements
|
||||
);
|
||||
}
|
||||
|
||||
if (! empty($counts)) {
|
||||
$sensors[] = new WirelessSensor(
|
||||
'clients',
|
||||
$this->getDeviceId(),
|
||||
$total_oids,
|
||||
'ciscowlc',
|
||||
0,
|
||||
'Clients: Total',
|
||||
$total
|
||||
);
|
||||
}
|
||||
$sensors[] = new WirelessSensor(
|
||||
'clients',
|
||||
$this->getDeviceId(),
|
||||
$total_oids,
|
||||
'ciscowlc',
|
||||
0,
|
||||
'Clients: Total',
|
||||
$total
|
||||
);
|
||||
|
||||
return $sensors;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user