On Wed, Jun 26, 2013 at 10:26 PM, Oleg Gritsak <g...@medvedko.dyndns.info>wrote:

> Hello!
>
> First of all, thank you for such a great software made under opensource
> license!
> Didn't want to bother anyone, but already spent several days on this
> problem without
> any positive result. :( Maybe someone will make a hint, please?
>
> Have a task to import snmp traps to OracleSQL. Already spent a week
> meditating at
> snmptrapd code. Cannot find part of it, which processes switch "-d".
>
> NETSNMP_DS_LIB_DUMP_PACKET seems to lead to xdump(), but printf-fing
> *buffer
> shows only the binary data.
>
> Idealy, I should clinch to that part, which outputs to screen
>
> # TRAP
> community=...
> ip=...
> oid=...
>
> et c
>
> Maybe it will be an ugly solution, but at this point we need results, not
> beauty.
>

I think you can accomplish this just via the configuration file.  I use
this config file to just dump traps:

# snmptrapd config for just dumping any received trap to stderr
# snmptrapd -C -c ~/localtrap -Le -a
doNotFork yes
disableAuthorization yes
#
format1 %y-%02m-%02l %02h:%02j:%02k SNMPV1 %A (%a) %B (%b) %P\n Enterprise
%N type %w sub-type %q\n %V\n %v\n--------------\n
format2 %y-%02m-%02l %02h:%02j:%02k %B (%b) %P\n %V\n %v\n--------------\n
#
[snmp] mibdirs
/usr/share/snmp/mibs:/usr/share/snmp/eos-mibs:/home/fenner/src/netdisco-mibs/cisco
[snmp] mibs all


  Bill
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to