Easgs
May 17, 2025, 4:18am
1
Hi, I have installed zabbix in opensuse 15.6 to monitor some servers, everything is working fine, but I want to monitor some cisco switches via snmp traps, but I am stuck in the linux configuration part, I have follow some linux configuration guides not specific to opensuse with no look, have anyone setup opensuse to receive traps?
https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/snmptrap
In this guide, we will show you how to set up SNMP trap in Zabbix on the RHEL 9 operating system, both for SNMPv2 and SNMPv3!
Est. reading time: 9 minutes
thanks
snmptrapd
is provided by the net-snmp
package which should be installed by default, if not - install it and follow the documentation.
Easgs
May 18, 2025, 4:20am
3
Thanks for the help, I didn’t have to install anything, the service was already there, so what I did was.
start the service
systemctl start snmptrapd.service
wget https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/misc/snmptrap/zabbix_trap_receiver.pl -O /usr/bin/zabbix_trap_receiver.pl
chmod +x /usr/bin/zabbix_trap_receiver.pl
and modify the files
nano /etc/snmp/snmptrapd.conf
authCommunity execute c0mun1d4dsnmp
perl do "/usr/bin/zabbix_trap_receiver.pl";
Save the file
edit the file /etc/zabbix_server.conf
nano /etc/zabbix_server.conf
SNMPTrapperFile=/tmp/zabbix_traps.tmp
StartSNMPTrapper=1
save the file
check the following line in the file /usr/bin/zabbix_trap_receiver.pl
$SNMPTrapperFile = '/tmp/zabbix_traps.tmp';
I don’t remember if I had to create the file /tmp/zabbix_traps.tmp manually.
keep this in mind too
I also needed to set the {$SNMP_COMMUNITY}
to my setting which was c0mun1d4dsnmp
in the Zabbix UI ⇾ Administration ⇾ General ⇾ Macros section.