just set up snmp traps (Zabbix 5.2.0), everything is ok, but it looks like the host interface has to be IP address, dns does not work, when I use IP address, the traps show up in Zabbix, but will not show up after switch to dns, the log shows "unmatched trap received from" message, when I switch back to IP address, it works again, may be I missed some config settings?
Ad Widget
Collapse
host interface ip/dns for snmp trap
Collapse
X
-
I have both ip and dns configured and switch between them, all other SNMP pulling are working correctly with either ip or dns, below loggings show snmptrapd is receiving traps (#1 and #3), but "unmatched trap" in logging (#2) when zabbix failed to process the trap with dns selected,
Aug 16 18:57:14 zabbix2.test.dllstx09.us.to.gin.ntt.net snmptrapd[8785]: 2022-08-16 18:57:14 129.250.81.157(via UDP: [129.250.81.157]:33079->[204.2.140.14]:162) TRAP, SNMP v1, community public
PowerNet-MIB::apc Enterprise Specific Trap (PowerNet-MIB::apcTestTrap) Uptime: 26 days, 22:08:52.80
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (232613280) 26 days, 22:08:52.80
SNMPv2-MIB::snmpTrapOID.0 = OID: PowerNet-MIB::apcTestTrap
Aug 16 18:57:15 zabbix2.test.dllstx09.us.to.gin.ntt.net zabbix_server[428]: unmatched trap received from "129.250.81.157": 18:57:14 2022/08/16 PDU INFO:
transactionid 3186
messageid 0
receivedfrom UDP: [129.250.81.157]:33079->[204.2.140.14]:162
community public
requestid 0
notificationtype TRAP
errorindex 0
errorstatus 0
version 0
VARBINDS:
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (232613280) 26 days, 22:08:52.80
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: PowerNet-MIB::apcTestTrap
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (232613280) 26 days, 22:08:52.80
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: PowerNet-MIB::apcTestTrap
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 type=64 value=IpAddress: 129.250.81.157
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 type=4 value=STRING: "public"
SNMPv2-MIB::snmpTrapEnterprise.0 type=6 value=OID: PowerNet-MIB::apc
Aug 16 20:19:17 zabbix2.test.dllstx09.us.to.gin.ntt.net snmptrapd[8785]: 2022-08-16 20:19:17 129.250.81.157(via UDP: [129.250.81.157]:33960->[204.2.140.14]:162) TRAP, SNMP v1, community public
PowerNet-MIB::apc Enterprise Specific Trap (PowerNet-MIB::apcTestTrap) Uptime: 26 days, 23:30:56.40
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233105640) 26 days, 23:30:56.40
SNMPv2-MIB::snmpTrapOID.0 = OID: PowerNet-MIB::apcTestTrap
thanks!Comment
-
-
-
Hi all,
Although I don't have a fix for this (and I have the same problem), I *might* have a reason for it.....
The incoming trap doesn't have the DNS name (FQDN) of the host :
If you changed the SNMP host interface definition to "129.250.81.157" then there would be a match in Zabbix and it would work.Code:receivedfrom UDP: [129.250.81.157]:33079->[204.2.140.14]:162
This of course would cause problems if the DNS name is actually a dynamic DNS service and the IP Address changes regularly.
I wonder, can snmptrapd be configured to translate source IP Addresses to FQDN's - i.e. do the equivalent of an nslookup on the receivedfrom IP address ? I'll go and have a look around.
Dave.Comment
-
You can at least modify the trap receiver Perl script (https://git.zabbix.com/projects/ZBX/...ap_receiver.pl) to do a reverse lookup for the IP if you want.
MarkkuComment
Comment