mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Fix the too_many_xml event to avoid unnecessary repetitions.
This commit is contained in:
parent
6ea6c77cac
commit
def083097d
@ -192,7 +192,7 @@ sub data_producer ($) {
|
|||||||
if ($pa_config->{'too_many_xml'} > 0) {
|
if ($pa_config->{'too_many_xml'} > 0) {
|
||||||
while (my ($agent_name, $xml_count) = each(%AgentCounts)) {
|
while (my ($agent_name, $xml_count) = each(%AgentCounts)) {
|
||||||
if ($xml_count > $pa_config->{'too_many_xml'}) {
|
if ($xml_count > $pa_config->{'too_many_xml'}) {
|
||||||
pandora_timed_event(300, $pa_config, "Too many XML files for agent $agent_name ($xml_count)", 0, 0, 0, 0, 0, 'warning', 0, $dbh);
|
pandora_timed_event(300, $pa_config, "Too many XML files for agent $agent_name", 0, 0, 0, 0, 0, 'warning', 0, $dbh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,9 +253,8 @@ sub data_producer_smart_queue ($) {
|
|||||||
# Generate an event if there are too many XML files for a given agent.
|
# Generate an event if there are too many XML files for a given agent.
|
||||||
if ($pa_config->{'too_many_xml'} > 0) {
|
if ($pa_config->{'too_many_xml'} > 0) {
|
||||||
while (my ($agent_name, $xml_count) = each(%AgentCounts)) {
|
while (my ($agent_name, $xml_count) = each(%AgentCounts)) {
|
||||||
print ">>> AGENT: $agent_name COUNT: $xml_count\n";
|
|
||||||
if ($xml_count > $pa_config->{'too_many_xml'}) {
|
if ($xml_count > $pa_config->{'too_many_xml'}) {
|
||||||
pandora_timed_event(300, $pa_config, "Too many XML files for agent $agent_name ($xml_count)", 0, 0, 0, 0, 0, 'warning', 0, $dbh);
|
pandora_timed_event(300, $pa_config, "Too many XML files for agent $agent_name", 0, 0, 0, 0, 0, 'warning', 0, $dbh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user