UNKNOWN in the Value 0 snmptt version 1.4.2
Brought to you by:
alex_b
Bug in snmptt version 1.4.2
When this line was changed to remove most non alphanumeric characters.
$tempvar[0] =~ s/[^a-zA-Z0-9.-_]//g; # Remove most non alphanumeric characters
It caused line 3291 to fail when <unknown> is in the Value 0 of the trap when DNS is disabled or cannot be resolved.</unknown>
To fix it change line 3291 in the snmptt file from
if ($tempvar[0] =~ /<unknown>/) {</unknown>
to
if ($tempvar[0] =~ /UNKNOWN/) {
This has been fixed in 1.5beta1 but with a small change:
if ($tempvar[0] =~ /^UNKNOWN$/) {
Thanks for the fix.