ARISTA Switch SNMP Checks

Hi @kano

From the OID .1.3.6.1.2.1.47.1.1.1.1.2.100315201 the beginning .1.3.6.1.2.1.47.1.1.1.1 is the prefix for the entPhysicalEntry the Table you are looking at, the ned .2 means its a value from the entPhysicalDescr column of this table and the .100315201 is the Index of the rwo you are looking at. If you walk .1.3.6.1.2.1.47.1.1.1.1.2 You will get all rows in the entPhysicalDescr column. So basically only the names of the devices. If you walk .1.3.6.1.2.1.47.1.1.1.1 instead you will get the whole table.

In the following example the collected data would be a list of (id, description) pairs from this table.

from .agent_based_api.v1 import *

def parse_arista(string_table):
    print(string_table)
    return string_table

register.snmp_section(
        name = "arista",
        detect = startswith(".1.3.6.1.2.1.1.1.0", "Arista"),
        parse_function=parse_alcatel,
        fetch = [
            SNMPTree(
                base = '.1.3.6.1.2.1.47.1.1.1.1',
                oids = [
                    OIDEnd(),
                    '2', # entPhysicalDescr
            ],
        ),
)

Something like

[[
  ("1", "48 SFP+ +4 QSFP 10Gb 1RU"),
  ("100004002", "Scd Chip 2"),
  ("100006001", "Cpu temp sensor"),
  ....
]]

According to this article you may need to use this IDs (ex: 100315201) to then query an other table. .1.3.6.1.2.1.99.1.1.1. If you can share an snmpwalk of .1.3.6.1.2.1.99.1.1.1 I may be able to further help you with this.

Regards Marius