how to use traphandle to call a script?
Stéphane Charette <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CA+HxBUL-c3eAAwwi00ubEnrbpC1iJcy55DAKP36WKcK2GuQXbQ@mail.gmail.com> |
I need to have a script called when certain trap notifications are triggered. My /etc/default/snmp has the following: export MIBDIRS=/usr/share/snmp/mibs SNMPDRUN=yes SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I-smux -p /var/run/snmpd.pid' TRAPDRUN=yes TRAPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -p /var/run/snmptrapd.pid' SNMPDCOMPAT=yes And my /etc/snmp/snmptrapd.conf has this: authCommunity log,execute,net public ignoreAuthFailure no logOption LS7d traphandle default /usr/sbin/my-trap-script #forward default udp:192.168.1.33:161 The problem is the test script /usr/sbin/my-trap-script is not getting called when I try and trigger a trap. I'm attempting to send the trap using a function that was generated with: mib2c -c mib2c.notify.conf myTestMib Unfortunately, I see nothing being logged by syslog. The only hint that something has gone wrong is the following logged to stderr from my app when I call the function to send the trap: No log handling enabled - turning on stderr logging truncating integer value > 32 bits Am I using the "traphandle" command wrong? Is there something else I'm missing? Thanks in advance! Stéphane Charette ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ 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