dhtech / snmpexporter

SNMP Exporter (for Prometheus and others)
GNU Lesser General Public License v3.0
21 stars 9 forks source link

Rework how we gather model number from targets #28

Open ventris opened 5 years ago

ventris commented 5 years ago

Currently we have a list of oids that we scrape to get the model for the model specific oids, and the first one that got data will be the one used.

https://github.com/dhtech/snmpexporter/blob/2315184af1d2f9c84fb1fcf6073261ea641b21fb/snmpexporter/snmpimpl.py#L131-L137

This is a problem with juniper mx10k routers as they will send its id number on 1.3.6.1.2.1.47.1.1.1.1.13.1 and not the readable model number. The model number is send by the 1.3.6.1.2.1.1.1.0 oid on those routers and that is last in the current list.

Evaluate if it is possible to change this without breaking all other targets.

Zmegolaz commented 5 years ago

I suspect this is the case for more Juniper models, since there's already an entry for ^710-.*.