3

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.

Joao Figueiredo
  • 208
  • 2
  • 9
  • I've concoted a script which parses all the necessary parameters from a Zabbix Action (each line following a controlled structure), mapping all the required parameters from the zabbix notation to the SNMP tree values range and later calling snmptrap -v2c – Joao Figueiredo Mar 16 '12 at 09:12

2 Answers2

1

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.

Pablo Recalde
  • 115
  • 1
  • 7
charkh
  • 41
  • 1
  • 10
0

mib2zabbix

Perl script will generate a Zabbix v3 Template in XML format from an OID tree in a SNMP MIB file.

Read more here: https://github.com/cavaliercoder/mib2zabbix

Haim Cohen
  • 111
  • 2