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 ?
Asked
Active
Viewed 1,124 times
0
-
2This totally depends on the availability of these counters in SNMP, which varies per vendor, device and operating system. – Teun Vink Aug 04 '20 at 05:49
-
I am using cisco Nexus N3K-3064PQ and I am trying to find which OID can provide metric for query – Jimmy Nguyen Aug 04 '20 at 06:00
-
Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer. – Ron Maupin Dec 16 '20 at 23:25
-
Do you have the MIBs use an snmp browser load your MIB file and find it. – Bharat C Penumutchu Jan 02 '21 at 11:55
2 Answers
1
Monitoring a VLAN inside a trunk port doesn't make too much sense. Usually, you monitor the physical link (trunk) and the SVI (VLAN-IP binding). If you want to monitor VLAN connectivity across multiple switches, that's highly software dependent.

Zac67
- 81,287
- 3
- 67
- 131
-
Exactly that I want, I want to monitor VLAN traffic across multiple devices, I have many servers connected to separate ports, and they can use the same VLAN (sometimes they have Internet-VLAN) so I want to monitor separate Local VLAN traffic and Internet VLAN traffic – Jimmy Nguyen Aug 05 '20 at 02:36
-
If you want to actually monitor *traffic* you'd need something like NetFlow or sFlow. RMON could also be used but it's only on the interface level. – Zac67 Aug 05 '20 at 06:14
-
-
Sure. NetFlow and sFlow sample an adjustable fraction of a port's traffic and send a digest to a data collector. Then you can run any analysis you want (and that your software allows) on it, including filtering by VLAN ID. – Zac67 Aug 06 '20 at 06:07
0
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 ifHCInOctets
or ifHCOutOctets
as well:
VLAN-5
on Cisco devices is likely to be a layer-2 interface which may have countersVlan5
is generally a layer-3 SVIGigabitEthernet0/1.5
may 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?

Jeff Wheeler
- 5,439
- 9
- 18
-
Thanks, I tried to use snmpwalk with ifHCOutOctets, and that only works with layer-3 SVI and can't query layer-2 VLAN. When I trying to query metric with layer-3 SVI, I have a problem that my metric usually get some random time value is null [link](https://postimg.cc/QF3sgf0Y), what happened ? – Jimmy Nguyen Aug 05 '20 at 02:41