Hi, I'm trying to configure Zabbix to receive traps. I see snmptrapd port receiving traps. but, not writing to /tmp/zabbix_traps.tmp
I have followed the below procedure
1. Installed net-snmp-utils net-snmp-perl net-snmp
2. snmpd and snmptrapd service is running
3. cp ./zabbix-4.4.6/misc/snmptrap/zabbix_trap_receiver.pl /usr/bin
4. chmod +x /usr/bin/zabbix_trap_receiver.pl
5. added below lines to snmptrapd.conf authCommunity execute public perl do "/usr/bin/zabbix_trap_receiver.pl";
6. vi /etc/zabbix/zabbix_server.conf StartSNMPTrapper=1 SNMPTrapperFile=/tmp/zabbix_traps.tmp (same as zabbix_trap_receiver.pl)
7. restarted Zabbix server and snmptrapd.
when I send traps I can see it server receiving through tcpdump but not in zabbix_traps.tmp file
--------------------------------------------------------
[root@ip-10-1-1-75 tmp]# tcpdump -i eth0 port 162 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 00:10:31.780614 IP 192.168.1.174.49298 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:32.274401 IP 192.168.1.174.50426 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:32.689732 IP 192.168.1.174.55607 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:33.203367 IP 192.168.1.174.43456 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0"
----------------------------------------------------------
[root@ip-10-1-1-75 zabbix-4.4.6]# [root@ip-10-1-1-75 zabbix-4.4.6]# cat /tmp/zabbix_traps.tmp [root@ip-10-1-1-75 zabbix-4.4.6]# [root@ip-10-1-1-75 zabbix-4.4.6]#
--
Thanks
Vikas Gurlinka
I have followed the below procedure
1. Installed net-snmp-utils net-snmp-perl net-snmp
2. snmpd and snmptrapd service is running
3. cp ./zabbix-4.4.6/misc/snmptrap/zabbix_trap_receiver.pl /usr/bin
4. chmod +x /usr/bin/zabbix_trap_receiver.pl
5. added below lines to snmptrapd.conf authCommunity execute public perl do "/usr/bin/zabbix_trap_receiver.pl";
6. vi /etc/zabbix/zabbix_server.conf StartSNMPTrapper=1 SNMPTrapperFile=/tmp/zabbix_traps.tmp (same as zabbix_trap_receiver.pl)
7. restarted Zabbix server and snmptrapd.
when I send traps I can see it server receiving through tcpdump but not in zabbix_traps.tmp file
--------------------------------------------------------
[root@ip-10-1-1-75 tmp]# tcpdump -i eth0 port 162 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 00:10:31.780614 IP 192.168.1.174.49298 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:32.274401 IP 192.168.1.174.50426 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:32.689732 IP 192.168.1.174.55607 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0" 00:10:33.203367 IP 192.168.1.174.43456 > ip-10-1-1-75.ec2.internal.snmptrap: Trap(47) S:1.1.5.4 0.0.0.0 enterpriseSpecific s=33 55 S:1.1.5.4="eth0"
----------------------------------------------------------
[root@ip-10-1-1-75 zabbix-4.4.6]# [root@ip-10-1-1-75 zabbix-4.4.6]# cat /tmp/zabbix_traps.tmp [root@ip-10-1-1-75 zabbix-4.4.6]# [root@ip-10-1-1-75 zabbix-4.4.6]#
--
Thanks
Vikas Gurlinka
Comment