Categories
Technical Blog

Receiving SNMP v3 traps with Zabbix



The Zabbix documentation so far has been lacking real information about how to receive SNMP traps other then v1 or v2.

Everyone with hardware that is a bit up to date and want to keep things save by using not plain text will use SNMP v3 today.

So how can we do this with Zabbix ?

First of all if you are still on an older OS like CentOS or RedHat 7 you will encounter the problem that AES256Bit encryption is not supported by the OS only 128Bit so make sure when you setup SNMPv3 on your devices that you use the correct encryption. Zabbix will not give you any warnings that the encryption is not supported.

If you make use of the snmptrapd daemon with the Zabbix perl script to parse the traps then you will have to do things a bit different its all very straightforward but as with everything you just need to know.

http://snmp.com/snmpv3/snmpv3_aes256.shtml

The next url will show you how to setup up traps for Zabbix.

https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/snmptrap

Now the only thing that we need to do is change our snmptrad.conf file to accept incoming traps from our snmpv3 devices. Add following info into the file

createUser -e <engineid> <user> SHA <key> AES <key>

authUser log,execute <user>

perl do “/usr/bin/zabbix_trap_receiver.pl”;

 
authUser needs to have the execute option else the perl script will not be executed.

Important to know is that engineid is the engineid for the trap not the engineid configured on the device.


There is also the option to send traps or a confirmation with informs. This will send an ack back to the switch.

More information can be found here: http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap-v3.html

In need for some Zabbix training? Find our official courses here.