atTable (1.3.6.1.2.1.3.1 <https://www.alvestrand.no/objectid/1.3.6.1.2.1.3.1.html>) contains atEntry rows (1.3.6.1.2.1.3.1.1 <https://www.alvestrand.no/objectid/1.3.6.1.2.1.3.1.1.html>), each of which has three columns, one of which is atIfIndex (1.3.6.1.2.1.3.1.1.1 <https://www.alvestrand.no/objectid/1.3.6.1.2.1.3.1.1.1.html>). The description of atIfIndex says:
*"The interface on which this entry's equivalence is effective. The interface identified by a particular value of this index is the same interface as identified by the same value of ifIndex." * Therefore, if you're not seeing this, it's probably a problem with your snmp generator configuration. Can you show your generator.yml, and give an example of the metrics you are getting? Aside: atTable is ancient and deprecated since 1991 (MIB-II). If your device supports one of the newer MIBs like ipNetToMediaTable (1.3.6.1.2.1.4.22, RFC 1213) or ipNetToPhysicalTable (1.3.6.1.2.1.4.35, RFC 4293), you should use that instead. Note that these tables contain the MAC addresses of *other* devices on your network. If you want the MAC address *of the interface itself*, then there is ifPhysAddress from the ifTable (which is collected with the out-of-the-box SNMP generator config). # HELP ifPhysAddress The interface's address at its protocol sub-layer - 1.3.6.1.2.1.2.2.1.6 # TYPE ifPhysAddress gauge ifPhysAddress{ifAlias="",ifDescr="ether1",ifIndex="1",ifName="ether1",ifPhysAddress="00:5A:FF:1C:79:FD"} 1 On Wednesday, 1 November 2023 at 20:24:39 UTC Tyler Mace wrote: > I am using a cisco_wlc switch with snmp-exporter. > > The SNMP service knows about the connected MAC addresses for each port > (through it's ARP table). Every other field for network metrics uses > ifIndex as an index input. But this index doesn't work for the > atPhysAddress OID. How can I correlate the ifIndex to the atPhysAddress to > dynamically get MAC addresses? > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/81b85cf2-d5ae-470e-98a9-6a4f974ba383n%40googlegroups.com.