Read the trap type (notification type) of SNMPv2 traps.

This commit is contained in:
Ramon Novoa 2014-11-17 15:43:36 +01:00
parent 90e8132923
commit cc196880a2
1 changed files with 5 additions and 0 deletions

View File

@ -222,6 +222,11 @@ sub pandora_snmptrapd {
return;
}
$oid =~ s/.* = OID: //;
if ($oid =~ m/^\.1\.3\.6\.1\.6\.3\.1\.1\.5\.([1-5])$/) {
$type = $1 - 1;
} else {
$type = 6;
}
$data = join("\t", @data);
}