[FROG] Why my snmptrap handle script not work?
Simon Jones
batmanustc at gmail.com
Wed Aug 14 08:09:00 EDT 2019
Hi all,
I'm following this to handle snmp trap:
http://docs.frrouting.org/en/latest/snmp.html
this is /etc/snmp/snmptrapd.conf:
> traphandle .3.6.1.2.1.15 /etc/snmp/snmptrap_handle.sh
this is snmptrap_handle.sh:
> echo "test" > temp.txt
and snmptrapd got SNMP trap like this:
> root at NX-ZWYC-M1F202-A16-HW6865-A-INT-212:/# snmptrapd -f -Lo
> NET-SNMP version 5.7.3
> 2019-08-14 11:53:50 172.18.8.212(via UDP:
> [127.0.0.1]:34916->[127.0.0.1]:162) TRAP, SNMP v1, community public
> iso.3.6.1.2.1.15 Enterprise Specific Trap (2) Uptime: 2:11:33.09
> iso.3.6.1.2.1.15.3.1.14.192.168.10.9 = Hex-STRING: 06 02
> iso.3.6.1.2.1.15.3.1.2.192.168.10.9 = INTEGER: 6
> 2019-08-14 11:54:04 172.18.8.212(via UDP:
> [127.0.0.1]:34916->[127.0.0.1]:162) TRAP, SNMP v1, community public
> iso.3.6.1.2.1.15 Enterprise Specific Trap (1) Uptime: 2:11:47.10
> iso.3.6.1.2.1.15.3.1.14.192.168.10.9 = Hex-STRING: 06 02
> iso.3.6.1.2.1.15.3.1.2.192.168.10.9 = INTEGER: 6
> 2019-08-14 11:57:39 172.18.8.212(via UDP:
> [127.0.0.1]:34916->[127.0.0.1]:162) TRAP, SNMP v1, community public
> iso.3.6.1.2.1.15 Enterprise Specific Trap (2) Uptime: 2:15:22.90
> iso.3.6.1.2.1.15.3.1.14.192.168.10.9 = Hex-STRING: 06 02
> iso.3.6.1.2.1.15.3.1.2.192.168.10.9 = INTEGER: 6
But snmptrap_handle.sh does not work, as there is no temp.txt.
So why ?
BTW, this is also not work
/etc/snmp/snmptrapd.conf:
> traphandle .1.3.6.1.4.1.3317.1.2.2 /etc/snmp/snmptrap_handle.sh
>
----
Simon Jones
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/frog/attachments/20190814/4d6e1e4b/attachment.html>
More information about the frog
mailing list