I am a newbie to building a monitor system using Prometheus and SNMP exporter, I have succeeded get metric from the physical interface, but I want to monitor VLAN on a trunk port, is that possible ? and how ?
I don't know if your N3K-3064PQ has the counters you want. My guess is it doesn't. However, you can check for yourself by using
snmpwalk or similar. Some relevant types of ifName values for an example VLAN 5 are below; and note you'll need to confirm they have a non-zero/incrementing
ifHCOutOctets as well:
VLAN-5on Cisco devices is likely to be a layer-2 interface which may have counters
Vlan5is generally a layer-3 SVI
GigabitEthernet0/1.5may be a router interface with a sub-interface 5 that you may have configured for e.g. dot1q 5
This older thread may help as well: How to Monitor Vlan Traffic?