diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index c7f4727267..cb2eb04600 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -271,6 +271,11 @@ sub pandora_load_config { $pa_config->{"snmpconsole_threads"} = 1; # 5.1 $pa_config->{"translate_variable_bindings"} = 0; # 5.1 $pa_config->{"translate_enterprise_strings"} = 1; # 5.1 + $pa_config->{"syncserver"} = 0; # 7.0 + $pa_config->{"sync_address"} = ''; # 7.0 + $pa_config->{"sync_port"} = '41121'; # 7.0 + $pa_config->{"sync_timeout"} = 5; # 7.0 + $pa_config->{"sync_retries"} = 2; # 7.0 # Internal MTA for alerts, each server need its own config. $pa_config->{"mta_address"} = '127.0.0.1'; # Introduced on 2.0 @@ -968,6 +973,21 @@ sub pandora_load_config { elsif ($parametro =~ m/^unknown_events\s+([0-1])/i) { $pa_config->{'unknown_events'} = clean_blank($1); } + elsif ($parametro =~ m/^syncserver\s+([0-9]*)/i) { + $pa_config->{'syncserver'}= clean_blank($1); + } + elsif ($parametro =~ m/^sync_address\s+(.*)/i) { + $pa_config->{'sync_address'}= clean_blank($1); + } + elsif ($parametro =~ m/^sync_port\s+([0-9]*)/i) { + $pa_config->{'sync_port'}= clean_blank($1); + } + elsif ($parametro =~ m/^sync_retries\s+([0-9]*)/i) { + $pa_config->{'sync_retries'}= clean_blank($1); + } + elsif ($parametro =~ m/^sync_timeout\s+([0-9]*)/i) { + $pa_config->{'sync_timeout'}= clean_blank($1); + } } # end of loop for parameter # # Set to RDBMS' standard port diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 7a182dfa33..67eeb04ac8 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -243,7 +243,7 @@ our @EXPORT = qw( # Some global variables our @DayNames = qw(sunday monday tuesday wednesday thursday friday saturday); -our @ServerTypes = qw (dataserver networkserver snmpconsole reconserver pluginserver predictionserver wmiserver exportserver inventoryserver webserver eventserver icmpserver snmpserver satelliteserver); +our @ServerTypes = qw (dataserver networkserver snmpconsole reconserver pluginserver predictionserver wmiserver exportserver inventoryserver webserver eventserver icmpserver snmpserver satelliteserver transactionalserver mfserver syncserver); our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter'); # Event storm protection (no alerts or events) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 1ccac23b48..a562f13b99 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -59,6 +59,7 @@ our @EXPORT = qw( SATELLITESERVER MFSERVER TRANSACTIONALSERVER + SYNCSERVER METACONSOLE_LICENSE $DEVNULL $OS @@ -119,6 +120,7 @@ use constant SNMPSERVER => 12; use constant SATELLITESERVER => 13; use constant TRANSACTIONALSERVER => 14; use constant MFSERVER => 15; +use constant SYNCSERVER => 16; # Value for a metaconsole license type use constant METACONSOLE_LICENSE => 0x01;