Added support for dynamic critical intervals.

This commit is contained in:
Ramon Novoa 2016-05-12 13:34:50 +02:00
parent 567d45cdc4
commit e9ac832299
1 changed files with 8 additions and 0 deletions

View File

@ -638,6 +638,11 @@ sub pandora_load_config ($) {
$conf->{'dbport'} = '3306' unless defined ($conf->{'dbport'});
$conf->{'claim_back_snmp_modules'} = '1' unless defined ($conf->{'claim_back_snmp_modules'});
# Dynamic interval configuration.
$conf->{"dynamic_constant"} = 0.10 unless defined($conf->{"dynamic_constant"});
$conf->{"dynamic_warning"} = 0.10 unless defined($conf->{"dynamic_warning"});
$conf->{"dynamic_updates"} = 5 unless defined($conf->{"dynamic_updates"});
# workaround for name unconsistency (corresponding entry at pandora_server.conf is 'errorlog_file')
$conf->{'errorlogfile'} = $conf->{'errorlog_file'};
$conf->{'errorlogfile'} = "/var/log/pandora_server.error" unless defined ($conf->{'errorlogfile'});
@ -1008,6 +1013,9 @@ sub pandoradb_main ($$$) {
# Move SNMP modules back to the Enterprise server
enterprise_hook("claim_back_snmp_modules", [$dbh, $conf]);
# Recalculating dynamic intervals.
enterprise_hook("update_min_max", [$dbh, $conf]);
log_message ('', "Ending at ". strftime ("%Y-%m-%d %H:%M:%S", localtime()) . "\n");
}