Try this: make mibs export MIBDIRS=mibs ./generator generate
On Fri, Apr 2, 2021 at 12:54 AM Ant nish <[email protected]> wrote: > Hi, > > New to Prometheus and Go generator. :) > I am getting following error while running a Go generator to generate > snmp.yml. > > #./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" > > #vim generator.yml > *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* > > Thank you! > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/21d06377-ea3c-408e-a04d-03af00449d4fn%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/21d06377-ea3c-408e-a04d-03af00449d4fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CABbyFmrMSc6nFnYnxrtFuBY3sxG_rA3GsYTsdbnf27-%3DxeVEsw%40mail.gmail.com.

