Prevent the counter from overflowing often when server_threshold is low.

This commit is contained in:
Ramon Novoa 2018-10-02 12:43:39 +02:00
parent 17b183a6eb
commit eba9c58f18
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);
}