Configuring Zabbix SNMP Traps

Suppose we configured snmp according to my instructions:
Configuring SNMP Traps on Linux
Now change the configuration file /etc/snmp/snmptt.conf.

After FORMAT should always be ZBXTRAP $aA
Example:

# Link Down
EVENT linkDown .1.3.6.1.6.3.1.1.5.3 "Status Events" Normal
FORMAT ZBXTRAP $aA Link down on interface $1.  Admin state: $2.  Operational state: $3
# Link Up
EVENT linkUp .1.3.6.1.6.3.1.1.5.4 "Status Events" Normal
FORMAT ZBXTRAP $aA Link up on interface $1.  Admin state: $2.  Operational state: $3

Main parameters /etc/snmp/snmptt.ini:

net_snmp_perl_enable = 1
mibs_environment = ALL
date_time_format = %H:%M:%S %Y/%m/%d
log_enable = 1
log_file = /var/log/snmptt/snmptt.log
unknown_trap_log_enable = 1
unknown_trap_log_file = /var/log/snmptt/snmpttunknown.log

Add the following parameters to the /etc/zabbix/zabbix_server.conf configuration file:

StartSNMPTrapper=1
SNMPTrapperFile=/var/log/snmptt/snmptt.log

Now add the data item through the Zabbix admin panel, for example, in the template:

Name: (any)
Type: (SNMP trap)
Key: (snmptrap[expression] or snmptrap.fallback to catch all traps for the node)
Information Type: (Log)

Judging by the added data items, you can add triggers.

Leave a comment

Leave a Reply

Discover more from IT Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading