[erlang-questions] Troubles Bridging SNMP and Mnesia

Serge Aleynikov saleyn@REDACTED
Thu Jun 5 03:56:21 CEST 2008


The value types in mnesia tables with snmp support must correspond to 
the SNMP mib spec.  As such no tuples are allowed (except for the 
compound key column) when you use default instrumentation functions.

So date(), time(), {node(), process} types must be replaced with 
integer() and string() types.

Serge

John Koenig wrote:
> Martin and All,
> 
> I have fiddled with my configuration a bit and was finally able to get 
> snmpwalk to browse the mnesia table under 1.3.6.1.4.1.31130 and 
> 1.3.6.1.4.1.31130.7.1 (defined in my POLLDATA.mib). However, an error is 
> thrown when snmpwalk reaches the end of the database. The first error is 
> the one listed in the erlang snmp-agent and the second is output by 
> snmpwalk.
> 
> ---- Erlang error from publisher_snmp
> =ERROR REPORT==== 4-Jun-2008::12:58:26 ===
> ** User error: Got {'reporter_server@REDACTED 
> <mailto:reporter_server@REDACTED>',reporter} from 
> {snmp_generic,table_func,[{pollData,mnesia}]}. Using wrongType
> 
> 
> ----Error from snmpwalk
>  > snmpwalk -v 2c -c public localhost:4000 1.3.6.1.4.1.31130
> 
> POLLDATA::rowId.1 = INTEGER: 1
> POLLDATA::rowId.2 = INTEGER: 2
> .
> .
> .
> POLLDATA::rowId.614 = INTEGER: 614
> POLLDATA::rowId.615 = INTEGER: 615
> POLLDATA::rowId.616 = INTEGER: 616
> Error in packet.
> Reason: (genError) A general failure occured
> Failed object: POLLDATA::rowId.616
> 
> 
> The data that appears in the table (all 616 rows of it) looks exactly 
> the same and are of the form:
> 
> {tableName, rowID (int and key for snmp), {node, process}, stackSize, 
> heapSize, messageqlen, date(), time()}
> 
> 
> Also, to comple POLLDATA.mib I included a POLLDATA.funcs which contains 
> the following:
> 
> { pollData, { snmp_generic, table_func, [{pollData, mnesia}]}}.
> 
> 
> Thoughts?
> 
> John
> 
> 
> Martin Bjorklund wrote:
>> Hi,
>>
>> John Koenig <koenigjm@REDACTED> wrote:
>>   
>>> 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
>>>     
>> The OID on the line above ask for the enterprise OID 31130 (Basho
>> Technologies).  But you said you wanted to ask for
>> enterprises.31130.7.1.
>>
>> So either try to ask directly for enterprises.31130.7.1, or even
>> better, do
>>
>>   snmpwalk -v 2c -c public localhost:4000 1.3.6.1.4.1.31130
>>
>> to print all objects in you entererprise MIB.
>>
>>
>> /martin
>>
>>   
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list