On 7 August 2012 09:33, Edgar <[email protected]> wrote:
>> As long as the CPQHLTH-MIB is installed properly (and being read in)
>> then this should be handled automatically.
>
> yes, if you use snmpwalk or snmpget and co. But, this is a line from an
> SNMP trap. The SNMP trap daemon we use, OP5 Trapper, by default logs
> its' traps as raw data into a logfile.
[snip]
> As this works, it's cumbersome and error-prone. Whence the question: Is
> there another and easier way to do this?
Use 'snmptrapd' :-)
Actually that's only half tongue-in-cheek.
In many ways, the most obvious approach would be for the trap receiver
to handle this conversion. Our trap receiver uses the same MIB library
as the other tools, so will pick up the MIB, and translate the incoming
varbind (both OID and value).
You'd might try talking to the suppliers of OP5 Trapper to see if they can
do something similar.
If you are writing an application to process the raw data, then the simplest
approach might be to read the OID. type and value information, set up a
"netsnmp_variable" structure to hold this data, and then call one of the
'print_variable()' APIs to display it in the desired form.
Have a look at the code for 'snmpset.c' or 'snmpget.c' for guidance.
Dave
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users