New to Prometheus and Go generator. :)
#./generator generate
level=info ts=2021-04-01T22:18:26.438Z caller=net_snmp.go:144 msg="Loading MIBs" from=mibs
level=warn ts=2021-04-01T22:18:26.546Z caller=main.go:120 msg="NetSNMP reported parse error(s)" errors=21012
level=info ts=2021-04-01T22:18:26.546Z caller=main.go:52 msg="Generating config for module" module=IF-MIB
level=error ts=2021-04-01T22:18:26.546Z caller=main.go:130 msg="Error generating config netsnmp" err="cannot find oid 'ifXTable' to walk"
modules:
IF-MIB: # The module name. You can have as many modules as you want.
walk: # List of OIDs to walk. Can also be SNMP object names or specific instances.
- sysUpTime # Same as "1.3.6.1.2.1.1.3"
- ifXTable # Instance of "ifHCInOctets" with index "40"
version: 2 # SNMP version to use. Defaults to 2.
# 1 will use GETNEXT, 2 and 3 use GETBULK.
max_repetitions: 25 # How many objects to request with GET/GETBULK, defaults to 25.
# May need to be reduced for buggy devices.
retries: 3 # How many times to retry a failed request, defaults to 3.
timeout: 5s # Timeout for each individual SNMP request, defaults to 5s.
auth:
# Community string is used with SNMP v1 and v2. Defaults to "public".
community: public!
lookups:
- source_indexes: [ifIndex]
lookup: ifAlias
- source_indexes: [ifIndex]
lookup: ifDescr