On Tue, 8 Aug 2017 20:42:39 +0000 Michael wrote: MS> This is my first time working with SNMP, but after reading the MS> SNMP pages I'm still having trouble getting a simple shell MS> script to run when receiving a trap.
Did you resolve this issue? MS> Now it seems that the trap does get logged, because the system MS> log file (/var/log/messages) has the following entry: MS> MS> Aug 8 15:46:10 <server_name> snmptrapd[29477]: 2017-08-08 MS> 15:46:10 localhost [UDP: MS> [127.0.0.1]:44928->[127.0.0.1]]:#012DISMAN-EVENT-MIB::sysUpTimeInstance MS> = Timeticks: (1338382434) 154 days, MS> 21:43:44.34#011SNMPv2-MIB::snmpTrapOID.0 = OID: MS> NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification#011NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate MS> = INTEGER: 123456 There are a few things that can prevent the trap handler from running: - permissions. make sure the script has execute permissions - SELinux. If enabled, make sure that the script has the right context. Check /var/log/audit/audit.log for AVC errors. Hope that helps. Robert ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders