Hi! I am following this tutorial:
https://blog.zabbix.com/snmp-traps-in-zabbix/8210/
And my zabbix logs are not displaying in /tmp/zabbix_traps.tmp. I went over the tutorial a few times and everything is written correctly. My Zabbix server host is also configured with SNMP and I created an item with the key snmptrap.fallback.
The firewall allows connections on port 162. I am on Ubuntu 22.04 and the latest version of Zabbix. I have visited this form post and I took out the semicolon at the end of
perl do "/usr/bin/zabbix_trap_receiver.pl and added use NetSNMP::TrapReceiver; to the top of /etc/snmp/snmptrapd.conf. I added both log and execute after the authCommunity line.
sudo ss -lunp command shows snmptrapd listening on UDP port 162 (although its listed twice -- idk if thats an issue).
ps ax | grep snmp returns:
936 ? Ss 0:00 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f
1315 ? S 0:00 /usr/sbin/zabbix_server: snmp trapper [processed data in 0.000013 sec, idle 1 sec]
4116 ? Ss 0:00 /usr/sbin/snmptrapd -LOw -f udp:162 udp6:162
5523 pts/1 S+ 0:00 vi /etc/snmp/snmptrapd.conf
5619 pts/0 R+ 0:00 grep --color=auto snmp
I think I remember that PrivateTemp was set to no, but I forget how to check
When I run:
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"
I get:
Cannot rename /var/lib/snmp/snmpapp.conf to /var/lib/snmp/snmpapp.0.conf
Cannot unlink /var/lib/snmp/snmpapp.conf
However, this message disappears if I run it with sudo.
I am slightly unsure if I am running v1 or v2, so when I run snmptrap -v 2c -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"
I get:
snmp_build: unknown failure
snmptrap: Error building ASN.1 representation (Can't build OID for variable)
If anyone is able to help & give me some troubleshooting steps that'd be greatly appreciated! Thank you!
https://blog.zabbix.com/snmp-traps-in-zabbix/8210/
And my zabbix logs are not displaying in /tmp/zabbix_traps.tmp. I went over the tutorial a few times and everything is written correctly. My Zabbix server host is also configured with SNMP and I created an item with the key snmptrap.fallback.
The firewall allows connections on port 162. I am on Ubuntu 22.04 and the latest version of Zabbix. I have visited this form post and I took out the semicolon at the end of
perl do "/usr/bin/zabbix_trap_receiver.pl and added use NetSNMP::TrapReceiver; to the top of /etc/snmp/snmptrapd.conf. I added both log and execute after the authCommunity line.
sudo ss -lunp command shows snmptrapd listening on UDP port 162 (although its listed twice -- idk if thats an issue).
ps ax | grep snmp returns:
936 ? Ss 0:00 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f
1315 ? S 0:00 /usr/sbin/zabbix_server: snmp trapper [processed data in 0.000013 sec, idle 1 sec]
4116 ? Ss 0:00 /usr/sbin/snmptrapd -LOw -f udp:162 udp6:162
5523 pts/1 S+ 0:00 vi /etc/snmp/snmptrapd.conf
5619 pts/0 R+ 0:00 grep --color=auto snmp
I think I remember that PrivateTemp was set to no, but I forget how to check

When I run:
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"
I get:
Cannot rename /var/lib/snmp/snmpapp.conf to /var/lib/snmp/snmpapp.0.conf
Cannot unlink /var/lib/snmp/snmpapp.conf
However, this message disappears if I run it with sudo.
I am slightly unsure if I am running v1 or v2, so when I run snmptrap -v 2c -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"
I get:
snmp_build: unknown failure
snmptrap: Error building ASN.1 representation (Can't build OID for variable)
If anyone is able to help & give me some troubleshooting steps that'd be greatly appreciated! Thank you!
Comment