Get Arista VRFs from an Arista extra MIB

Arista VRFs are not detected in the currently implemented way but there is a way to read the VRFs out with an Arista specific MIB. (http://www.circitor.fr/Mibs/Html/A/ARISTA-VRF-MIB.php)

One has to parse it out of the response of ARISTA-VRF-MIB::aristaVrfRoutingStatus, which is .1.3.6.1.4.1.30065.3.18.1.1.1.2.

Example:
snmpwalk -v2c -c xxxx 172.29.173.169 .1.3.6.1.4.1.30065.3.18.1.1.1.2
SNMPv2-SMI::enterprises.30065.3.18.1.1.1.2.3.109.103.116 = Hex-STRING: 00

It returns for example 3.18.1.1.1.2.3.109.103.116 where the first byte after the 2 is protocol identifier so 3 in dec is ipv4 and 9 in dec is ipv6 (I think). The rest are ascii codes in dec so in this case the vrf name would be ‘mgt’ (109 103 116).

After that getting the vrf specific route polling can be done with [email protected] string requests.

This should allow for BGP sessions within VRFs to be properly monitored.

See also: VRF's are not added/discovered for Arista switches

(EDIT):
snmp.txt
discovery.txt
poller.txt
(/EDIT)

(Imported from https://github.com/librenms/librenms/issues/10179, Original request by: @Senetus)

Possible helpful info:
Looks like it would be easier to do with oid 1.3.6.1.4.1.30065.3.18.1.2.1 and with the normal community, only the specific MIB has to be added to the system (ARISTA-VRF-MIB)

Hi,
PR for this VRF discovery is here :


Please test it and report feedback (preferably direclty in the PR)
Thanx