See for the official Zabbix site.

ConfigureSnmptrapsCentos6 RHEL6

Jump to: navigation, search

Install Packages

yum install net-snmp-utils
yum install net-snmp-perl
yum install snmptt
(perl-Net-SNMP will be installed together with snmptt)

Configure Service

chkconfig snmptt on
chkconfig snmptrapd on

Edit Zabbix Server Config

vi /etc/zabbix/zabbix_server.conf


Edit snmptrapd Config

vi /etc/snmp/snmptrapd.conf

traphandle default snmptt
authCommunity   log,execute,net public

Edit snmptt Config

vi /etc/snmp/snmptt.ini

translate_log_trap_oid = 2
net_snmp_perl_enable = 1
date_time_format = %H:%M:%S %Y/%m/%d
log_file = /tmp/zabbix_traps.tmp
log_system_enable = 1

vi /etc/snmptt.conf

EVENT general .* "General event" Normal

Create an SNMP item TEST

Host's SNMP interface IP:
Key: snmptrap["General"]
Log time format: hh:mm:ss yyyy/MM/dd

Open Firewall & Start Services

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m udp -p udp --dport 161 -j ACCEPT
service snmptrapd start
service snmptt start

Send an snmptrap

snmptrap -v 1 -c public '.' '' 6 33 '55' . s “teststring000”

Configure SELinux

grep snmptt /var/log/audit/audit.log | audit2allow -M snmptt
semodule -i snmptt.pp

Send a New Trap

snmptrap -v 1 -c public '.' '' 6 33 '55' . s “teststring000”

Based on the Zabbix Manual

Send comments & idea's to patrik<at>