diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 7947d056c4..80d28fa849 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -258,6 +258,7 @@ sub pandora_load_config { $pa_config->{"snmp_pdu_address"} = 0; # 5.0 $pa_config->{"snmp_storm_protection"} = 0; # 5.0 $pa_config->{"snmp_storm_timeout"} = 600; # 5.0 + $pa_config->{"snmp_delay"} = 0; # > 6.0SP3 $pa_config->{"snmpconsole_threads"} = 1; # 5.1 $pa_config->{"translate_variable_bindings"} = 0; # 5.1 $pa_config->{"translate_enterprise_strings"} = 1; # 5.1 @@ -530,6 +531,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^snmp_storm_timeout\s+(\d+)/i) { $pa_config->{'snmp_storm_timeout'}= clean_blank($1); } + elsif ($parametro =~ m/^snmp_delay\s+(\d+)/i) { + $pa_config->{'snmp_delay'}= clean_blank($1); + } elsif ($parametro =~ m/^snmpconsole_threads\s+(\d+)/i) { $pa_config->{'snmpconsole_threads'}= clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/SNMPServer.pm b/pandora_server/lib/PandoraFMS/SNMPServer.pm index a364d4ec60..41a134f0e6 100644 --- a/pandora_server/lib/PandoraFMS/SNMPServer.pm +++ b/pandora_server/lib/PandoraFMS/SNMPServer.pm @@ -328,6 +328,9 @@ sub pandora_snmptrapd { # Evaluate alerts for this trap pandora_evaluate_snmp_alerts ($pa_config, $trap_id, $source, $oid, $type, $oid, $value, $custom_oid, $dbh); } + + # Delay the consumption of the next task. + sleep($pa_config->{'snmp_delay'}) if ($pa_config->{'snmp_delay'} > 0); } ########################################################################################