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:
vgilc 2018-10-25 10:33:58 +02:00
commit 816811b5b7
2 changed files with 2 additions and 2 deletions

View File

@ -382,7 +382,7 @@ sub pandora_server_tasks ($) {
}
# Avoid counter overflow
if ($counter > 10000){
if ($counter >= ~0){
$counter = 0;
}
else {

View File

@ -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);
}