Merge branch 'fix/pandora_enterprise#2808-badxml' into 'develop'
Prevent the counter from overflowing often when server_threshold is low. See merge request artica/pandorafms!1837
This commit is contained in:
commit
816811b5b7
|
@ -382,7 +382,7 @@ sub pandora_server_tasks ($) {
|
|||
}
|
||||
|
||||
# Avoid counter overflow
|
||||
if ($counter > 10000){
|
||||
if ($counter >= ~0){
|
||||
$counter = 0;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -4882,7 +4882,7 @@ sub pandora_self_monitoring ($$) {
|
|||
|
||||
my $filename = $pa_config->{"incomingdir"}."/".$pa_config->{'servername'}.".self.".$utimestamp.".data";
|
||||
|
||||
open (XMLFILE, ">> $filename") or die "[FATAL] Could not open internal monitoring XML file for deploying monitorization at '$filename'";
|
||||
open (XMLFILE, ">", $filename) or die "[FATAL] Could not open internal monitoring XML file for deploying monitorization at '$filename'";
|
||||
print XMLFILE $xml_output;
|
||||
close (XMLFILE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue