Trouble generating snmp.yml with specific OIDs

215 views
Skip to first unread message

Daniel Poston

unread,
Nov 3, 2020, 11:41:15 AM11/3/20
to Prometheus Users
I'm having trouble generating a snmp.yml with snmp-exporter generator.  I have the following configuration file.  Everything works fine except for the two lines commented below.

eaton_1gbps:
     version: 3
     walk:
       - sysDescr
       - sysName
       - xupsBatCapacity
       - xupsBatTimeRemaining
       - xupsBatteryAbmStatus
       - upsmgBatteryReplacement
       - xupsEnvRemoteHumidity
       - xupsEnvRemoteTemp
       - xupsInputSource
        #       - 1.3.6.1.4.1.534.1.14.3.0 # This OID works in influx, and provides the firmware of the Eaton 1gbps card.
        #       - 1.3.6.1.4.1.534.1.14.5.0 # This OID works in influx, and provides the serial number of the Eaton 1gbps card.
       - xupsMIB.14.5.0 
       - xupsMIB.14.5.0
     auth:
       username: nsSNMP
       security_level: authPriv
       password: redacted
       auth_protocol: SHA
       priv_protocol: AES
       priv_password: redacted
     lookups:
     overrides: 

If I uncomment one of those lines, I get the following error:  

level=error ts=2020-11-03T16:26:53.842Z caller=main.go:130 msg="Error generating config netsnmp" err="cannot find oid '1.3.6.1.4.1.674.10892.5.4.700.20.1' to walk"

If I try to use snmptranslate I get the following:

EATON-OIDS::xupsMIB.14.3.0

If I plug xupsMIB.14.3.0 into the generator.yml file, I get the following error.

level=error ts=2020-11-03T16:32:41.603Z caller=main.go:130 msg="Error generating config netsnmp" err="cannot find oid 'xupsMIB.14.3.0' to walk"

Could someone with more experience with this tell me what I'm doing wrong?  

Thanks!

Brian Candler

unread,
Nov 3, 2020, 11:50:17 AM11/3/20
to Prometheus Users
Your MIB is missing the necessary object. You need to talk to your vendor to get an updated MIB.

xupsMIB is the vendor prefix (1.3.6.1.4.1.534)

If snmptranslate shows only xupsMIB.1.43.0, it means it doesn't have any more specific name to give to that object.  And therefore the MIB doesn't say what type of object it is.

Daniel Poston

unread,
Nov 3, 2020, 2:08:45 PM11/3/20
to Prometheus Users
Thank you very much for the prompt response.  I'll contact Eaton for updated mibs.
Reply all
Reply to author
Forward
0 new messages