WLC AP Up/Down Alerting

Then what does this post mean???

David_Przybyla

Nov '18

When APs are renamed, replaced, or permanently taken out of service, I do need to manually remove the old entries from the database. It can be annoying, but I find the value of the alert is worth it.

what database is he talking about… and we can’t keep all of them some of them have died and been replaced.

Exactly the same. Cisco does not provide the information “this AP was removed” or “This AP is unplugged”. Cisco only gives current list of APs. So you cannot make any conlusion unless you do this list yourself, by removing the decommissioned APs from LibreNMS DB.

This is practically not efficient.

This is exactly my point how does one go about doing this? We are trying to have Librenms tell us when an AP goes offline but it cannot do this if it thinks 182 replaced AP’s are offline. How does one go about removing decommissioned offline AP’s, efficient or not, from the database? This is my question.

You cannot do that until Cisco provides this information in a proper way. They have to keep the list of antennas and manage it from the controller. LibreNMS cannot do it for the WLC. That’s the all point.
This feature request should be sent to Cisco instead of LibreNMS …

the what database is David_Przybyla referring to in an earlier post where he says he takes them out… I am not asking for a feature request I am asking where and how to remove them manually

OK @Chris_DeLuca
Look at the table list, it is the 1st one :

MariaDB [librenms]> show tables;
+---------------------------+
| Tables_in_librenms        |
+---------------------------+
| access_points             |

1 Like

As @PipoCanaja says, it’s the access_points table. You can see which radios have been deleted thus:

select accesspoint_id, name, mac_addr from access_points where deleted = 1;

If you are happy this is a valid list of out-of-service radios, zap them from the table:

delete from access_points where deleted = 1;

HTH

Has anyone found a way to incorporate the AP name into the alerts? I know that from the database each AP gets listed twice because of the 2.4 and 5 GHz radios but I found you can pull the specific AP names out with this query:

SELECT DISTINCT name FROM access_points WHERE deleted = '1';

but I haven’t thought of a way to do it other than going out and writing a custom script to constantly query the database and send me an alert with each AP in the list.

Apologies for the delay in replying. I pulled out the unique APs using this alert template. If you find it useful please feel free to modify to meet your own needs:

Severity: {{ $alert->severity }}
Rule: @if ($alert->name)
{{ $alert->name }}
@else
{{ $alert->rule }}
@endif
@if ($alert->state == 0)
Time elapsed: {{ $alert->elapsed }}
@endif
Timestamp: {{ $alert->timestamp }}
Unique-ID: {{ $alert->uid }}

Controller: {{ $alert->hostname }}
Link: https://mycontroller/device/device={{ $alert->device_id }}/

@if ($alert->faults)
@foreach ($alert->faults as $key => $value)
@if ($key == 1)
@php
$i = $value['mac_addr'];
$loopcount = 1;
@endphp
@elseif ($key > 1)
@php
$j = $i;
$i = $value['mac_addr'];
@endphp
@endif
@if ($i != $j)
#{{ $loopcount }}: {{ $value['name'] }} ({{ $value['mac_addr'] }})
@php $loopcount++; @endphp
@endif
@endforeach
@endif

Total Access Points lost: {{ $loopcount - 1 }}
1 Like

No worries, that works perfectly! Thank you.

Just wanted to thank everyone who contributed to this thread. I was able to piece together your collected knowledge and get a basic alerting system going to send notifications when APs on our network go up and down. This has been a goal of mine for some time now. I owe its accomplishment to all of you.

Thanks!

1 Like

This alert was working great for us for a few weeks and then suddenly stopped working. Now I am having a hard time even getting the default “ap deleted=1” rule to work properly.

Does not appear to be a larger issue with notification settings/transport settings as I am still getting alerts for down devices that I have other rules for.

Might I need to adjust some settings in the database? I’d love to get this rule working again. If anyone has any suggestions, I am all ears!

Let me know if I can provide you with any additional information.

Thanks so much

Just tried setting up the same alert and it is not working. AP Name isn’t being displayed.

You can use this Nagios Plugin as a Service in LibreNMS and it works great for us.

Use the flag “–showerror_only” to see only the APs which are down.

@temporal-lin Are you able to share a screenshot of the service you have working (blank/blur any specific IPs etc) ?

Thanks

1 Like

Here you go! :slight_smile:

Host IP for the WLC IP address and SNMP for SNMP Community string.

P.S: You might have to change the permission on “/var/nagios_plugin_cache/” if there is no file after running the script for the first time. This is where it stores online AP MAC Address and name.

“sudo chmod o=rw -R /var/nagios_plugin_cache/” should do the job.

Hello!

Is it possible to see what AP who is down in the output of the check_snmp cisco wlc script?

Best regards!

I Answer myself: Yes it shows the AP who is down :slight_smile:

I am actually on Cisco 9800 and no AP count can be seen and SSID was also missing. Any one has this problem too? Alerts on AP down is another problem too

Hello!

Yes known limitation, You can read more here: Cisco CL9800 Wireless Controller support