Compare data of an access points with static list

Is there a way to compare a query result with a static list?


I have created a dashboard to show general data of a Cisco WLC (Catalyst 9800).
The data is fetched via Telegraf/InfluxDB.

Some Panels(Polystat) have to show the operation status ( color indication ) of all APs in a specific location.

I have tried via the bsnAPOperationStatus of the access points, but if an AP goes offline, the status does not change, but rather the AP just disappears, which is a Cisco issue( it does work in the Cisco Web ui).

In my next (naive) approach, I would like to compare the fetched data with a static list/set of all APs to visualize if one AP is missing.

Is this even possible?

In another thread, it was suggested to use data transform, but I could only manage to compare two queries of different time intervals, which might work for alerting but does not really help my visualization issue.

Sorry if this is stupid question, but I am quite new with this whole subject, and I am open for different suggestions.

Hey @cheeeh,

Welcome to the forum!

Your question is far from stupid, and indeed, your suggestion is interesting.

Since I don’t have any idea of what looks a measurement for this type of Cisco device, can you show us what your base looks like?

Also, what do you mean by:

Is this a parameter for the Telegraf Cisco input plugin? Is it a MIB related to some SNMP configuration?


1 Like

Hi @codi639 thx for the quick response,

bsnAPOrationstatus is the node name from OID

we are exporting different metrics for different purposes/solutions(telegraf, snmp_exporter, snmpwalk).

On Cisco Community it was suggested, that what I am looking for is basically a Cisco Prime Infrastructure feature.

My query looks like this:

from(bucket: “telegraf”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “bsnAPTable”)
|> filter(fn: (r) => r[“APName”] =~ /some regex/)
|> filter(fn: (r) => r[“_field”] == “bsnAPOperationStatus”)
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)

I don’t actually have to use the operation status, since the AP disappears from the SNMP poll if it stops working anyway and all I want to visualize is, if it is there(green) or gone(red).


I also tried to fetch two queries from different time intervals (e.g. 1h ago, last) and compare then, but then I am running into the issue that our business is closed on weekends, so there won’t be a difference if the AP was already down in the older time range.

Also, we have close to 200 APs in different locations, and sometimes they stay down for quite long, for maintenance reasons.

So taking a static list with e.g. the APname/IP and compare it with the data from InfluxDB/Telegraf, would be the easiest/quickest solution.

Hey @cheeeh,

I just read once again your issue.

Can you run an snmpwalk command with an AP down? I wanna see how it goes.
Also, I’m quite sure you can force NULL value if you don’t have any value in your base, then on Grafana just handle the NULL value by a DOWN.

About your query, I see that you are using the bsnAPTable input for telegraf, be sure that you have all the fields you need in your measurement, and the good one. I had an issue where my Telegraf was giving a name for collected data which was not data due to snmp compatibility (I don’t really think that’s possible since you’re using Cisco, but check anyway).

One last thing, can you show chat your data looks like, with influx, when an AP is down (bsnAPOperationStatus =? 0) and when an AP is up.

Best regards

Hi @codi639

Can you run an snmpwalk command with an AP down?

with snmpwalk it’s the same. if the ap is up, it shows bsnAPOperationstatus = 1,
if it is down, it should show OP status = 2, but it just does return nothing, like if there were no AP at all.

bsnAPTable is working just fine and returns all data just like expected.

One last thing, can you show chat your data looks like, with influx, when an AP is down (bsnAPOperationStatus =? 0) and when an AP is up.

my returned data looks likte this:
bsnAPOperationStatus {APName=<AP_name>, agent_host=<agent_host_ip>, host=<ap_host_address>}
value 1

Also, I’m quite sure you can force NULL value if you don’t have any value in your base

what do you mean by this?


I meant:
If you let Telegraf build the base you can’t control this setting. But if you build yourself the base where Telegraf is supposed to write you can add an optionfill NULL or something like this, then you’ll see NULL value instead of nothing.
As I’m writting my message I think of: if the AP is down, can you see it APName, agent_host, host fields/tags line in your base? If you can’t the problem is bigger and might be coming from Telegraf, influxdb V2 or directly from your Cisco device. Since you say me that the snmpwalk command works correctly for downed AP, I’m sure that’s not the case!


Oh I see, there is a misunderstanding.
The issue is the same with snmpwalk and relates to Cisco.
SNMP polls contain only data of the working APs.

I am trying a different approach now, where I will true to hardcode an array with all the APNames in the custom variables of the dashboard.
According to my understatement there should be a way to make this happen and I will update you ASAP

1 Like

Hi @codi639 just wanted to let you know, that I found a solution.

By using the “static” plugin, I was able to deploy a static list of access point names.

Then in a mixed query I am fetching data via Influx and compare it to the static one and with some fiddling around with data transformation, I am able to display which APs are in the static list but not showing in the Influx data and therefore are offline.

Thanks again for your help!