SNMP multiple tables into one measurement

I’m trying to collect data about my Cisco WLAN APs through SNMP. I want to know how many clients are connected per AP.

The problem I’m dealing with is that the name of the AP is in a different snmp table than the actual client count. Both tables share the same index but I can’t figure out how to add the AP name from table A as a tag for the client count from table B.

Here’s what I have so far:

    name = "bsnAPTable"
    inherit_tags = [ "hostname" ]
    index_as_tag = true

      name = "bsnApIfNoOfUsers"
      oid = "AIRESPACE-WIRELESS-MIB::bsnApIfNoOfUsers"

      name = "bsnAPName"
      oid = "AIRESPACE-WIRELESS-MIB::bsnAPName"
      is_tag = true

This results in a measurement “bsnAPTable” with on field “bsnApIfNoOfUsers”. But the tag “bsnAPName” is simply not there.

If I remove the is_tag = true from the bsnAPName, it appears as a field as expected.

Any clues how to get this working? Is it even possible?

I hope this makes sense.

I looked up the MIBs and it seems the 2 referenced OIDs don’t share the same index.

For bsnAPIfTable, that’s bsnAPDot3MacAddress + bsnAPIfSlotId and for bsnAPTable it is only bsnAPDot3MacAddress.

So because the indexes don’t match, telegraf isn’t able to merge them…

1 Like

Ohhhhh… How did i miss this -_-

Thanks for pointing this out.

Is there a way to modify the index via regex or some sort to make this happen? There are no common fields in the tables so I can’t utilize the secondary index functionality.

You can change a tag value with the regex processor, but I don’t think there is a way to merge the metrics afterwards…

Edit: You could try with the aggregators.merge plugin, but I don’t think the timestamps will be the same…

I’ll have a look at the merge aggregator, thanks :slight_smile:

1 Like