[erlang-questions] Troubles Bridging SNMP and Mnesia

John Koenig koenigjm@REDACTED
Wed Jun 4 15:24:24 CEST 2008


I am working on an application that utilizes snmpa to make a series of 
mnesia tables accessible to various non-erlang based snmp managers.  I 
have setup the mnesia tables for snmp access, stored data in the 
databases, generated corresponding mibs, compiled the mibs, and loaded 
the mibs into the snmpa running in my application space.  No errors are 
reported during the initialization of the mibs, mnesia objects, or the 
call to application:start(snmp).

The rub occurs when I try to use snmpget to fetch data out of the mnesia 
tables using the OIDs specified in the mibs.  I can snmpwalk the agent 
just fine and it returns the following ( I have removed some sensitive 
bits):

snmpwalk -c public -v2c 127.0.0.1:4000

SNMPv2-MIB::sysDescr.0 = STRING: <system_id>
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.31130
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (405973) 1:07:39.73
SNMPv2-MIB::sysContact.0 = STRING: <admin_email>
SNMPv2-MIB::sysName.0 = STRING: <sys_name>
SNMPv2-MIB::sysLocation.0 = STRING: <location>
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::snmpInPkts.0 = Counter32: 91
SNMPv2-MIB::snmpInBadVersions.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityNames.0 = Counter32: 0
SNMPv2-MIB::snmpInBadCommunityUses.0 = Counter32: 0
SNMPv2-MIB::snmpInASNParseErrs.0 = Counter32: 0
SNMPv2-MIB::snmpEnableAuthenTraps.0 = INTEGER: enabled(1)
SNMPv2-MIB::snmpSilentDrops.0 = Counter32: 0
SNMPv2-MIB::snmpProxyDrops.0 = Counter32: 0

But when I try to call snmpget specifying the OID I outlined in the mib 
(1.3.6.1.4.1.31130.7.1, the Object whose name matches the mnesia table) 
and get back:

snmpget -v 2c -c public localhost:4000 1.3.6.1.4.1.31130
SNMPv2-SMI::enterprises.31130 = No Such Object available on this agent 
at this OID

I configured the agent similarly to trapexit's SNMP Quick Start Guide , 
found here:  http://www.trapexit.org/SNMP_Quick_Start#

What am I missing?  Does this seem to be a configuration issue?  Or am I 
simply misusing snmpget?

I haven't included any config files or code snippets as I was unsure if 
it would be needed.  If you would like to know more don't hesitate to ask.

John Koenig



More information about the erlang-questions mailing list