Merge branch 'ent-5558-9625-no-funciona-proteccion-tormenta-de-traps-snmpv2' into 'develop'
Fix storm protection for SNMPv2 traps. See merge request artica/pandorafms!3096
This commit is contained in:
commit
05dbe9c922
|
@ -157,6 +157,10 @@ sub data_producer ($) {
|
||||||
|
|
||||||
# Storm protection.
|
# Storm protection.
|
||||||
my ($ver, $date, $time, $source, $null) = split(/\[\*\*\]/, $line, 5);
|
my ($ver, $date, $time, $source, $null) = split(/\[\*\*\]/, $line, 5);
|
||||||
|
if ($ver eq "SNMPv2" || $pa_config->{'snmp_pdu_address'} eq '1' ) {
|
||||||
|
$source =~ s/(?:(?:TCP|UDP):\s*)?\[?([^] ]+)\]?(?::-?\d+)?(?:\s*->.*)?$/$1/;
|
||||||
|
}
|
||||||
|
|
||||||
next unless defined ($source);
|
next unless defined ($source);
|
||||||
if (! defined ($AGENTS{$source})) {
|
if (! defined ($AGENTS{$source})) {
|
||||||
$AGENTS{$source}{'count'} = 1;
|
$AGENTS{$source}{'count'} = 1;
|
||||||
|
|
Loading…
Reference in New Issue