Hi.
I want to make custom output format for trap.
Here is my current configure :
/etc/snmp/snmptrapd.conf
authCommunity log,execute public
format1 %l-%m-%y %h:%j:%k ZBXTRAP %B %v\n
/etc/default/snmpd
TRAPDRUN=yes
TRAPDOPTS='-Lf /var/log/snmp/trap.log -p /var/run/snmptrapd.pid -OanUb -n'
snmp version: 5.4.3
This config works fine when I send trap like that :
snmptrap -v 1 -c public 10.81.104.254 '.1.3.6.1.6.3.1.1.5.3' '0.0.0.0' 6 33
'55' .1.3.6.1.6.3.1.1.5.3 s "teststring000"
After that in file /var/log/snmp/trap.log I can see this :
2-3-2014 13:5:33 ZBXTRAP 10.81.104.222 .1.3.6.1.6.3.1.1.5.3 = STRING:
"...teststring000..."
Work great, but whet trap is send by other network device then log looks
like that :
2014-03-01 23:17:51 10.81.104.3 [UDP: [10.81.104.3]:32768->[10.81.104.254]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (20279590) 2 days, 8:19:55.90
.1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.31926.3.1
.1.3.6.1.4.1.31926.2.1.1.7.1 = INTEGER: 3 .1.3.6.1.4.1.31926.2.1.1.8.1 =
INTEGER: 4 .1.3.6.1.4.1.31926.2.1.1.9.1 = INTEGER: 1
.1.3.6.1.4.1.31926.2.1.1.10.1 = INTEGER: 1
In this log disappear ZBXTRAP string and IP is replace by 10.81.104.3 [UDP:
[10.81.104.3]:32768->[10.81.104.254]]: \n <-newline
What I do wrong ?
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users