Zabbix – send a trap to a SNMP server

snmpzabbix

How to generate a SNMP trap per event (custom media type script?)
to a SNMP server/another monitoring tool ?

If so, how to pass the community + OID as arguments to the media type script?
By default, only the destination, subject and message seem to be passed to the script.

Best Answer

Did you try:

snmptrap -v 1 -c public 127.0.0.1 '.1.3.6.1.6.3.1.1.5.4' '0.0.0.0' 6 33 '55' .1.3.6.1.6.3.1.1.5.4 s "eth0"

The snmptrap is linux command (so easy to use in shell scripting). It is contained in the net-snmp-utils package.