[erlang-questions] Accessing the SNMP MIB 'Description' field

Martin Bjorklund mbj@REDACTED
Wed Jan 9 09:37:40 CET 2013


Bernie Duggan <bduggan@REDACTED> wrote:
> Hi list,
> I'm using the built-in SNMP agent module (snmpa) to read some SNMP
> data, and I was wondering if there's any way to access the DESCRIPTION
> field in the MIBS (either through snmpa or any other mechanism that
> doesn't involve me parsing the mib text files myself). The snmpc mib
> compiler provides a '--desc' option to include the description field
> into the compiled files (which can then be loaded by snmpa) but I
> can't see any way to access that data even if it is included.

The info is available (I think ;) in the #me{} (mib entry).  Use like

  {value, OID} = snmpa:name_to_oid(snmpEngineID),
  {ok, ME} = snmpa:me_of(OID ++ [0]),

See the documentation for snmpa:me_of().


More information about the erlang-questions mailing list