PandoraHA Splitbrain autorecovery

This commit is contained in:
fbsanchez 2021-09-15 21:38:10 +02:00
parent 4cd17dca40
commit 2e764afac7
3 changed files with 7 additions and 13 deletions

View File

@ -707,3 +707,7 @@ alertserver_threads 4
# Generate an hourly warning event if alert execution is being delayed more than alertserver_warn seconds. # Generate an hourly warning event if alert execution is being delayed more than alertserver_warn seconds.
alertserver_warn 180 alertserver_warn 180
# Pandora FMS HA MySQL cluster splitbrain auto-recovery (PANDORA FMS ENTERPRISE ONLY)
# IMPORTANT! Please understand and configure all settings from pandora_console/index.php?sec=gservers&sec2=enterprise/godmode/servers/HA_cluster&tab=setup
# before enable this feature.
#splitbrain_autofix 0

View File

@ -1290,6 +1290,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^pandora_service_cmd\s(.*)/i) { elsif ($parametro =~ m/^pandora_service_cmd\s(.*)/i) {
$pa_config->{'pandora_service_cmd'} = clean_blank($1); $pa_config->{'pandora_service_cmd'} = clean_blank($1);
} }
elsif ($parametro =~ m/^splitbrain_autofix\s(.*)/i) {
$pa_config->{'splitbrain_autofix'} = clean_blank($1);
}
} # end of loop for parameter # } # end of loop for parameter #

View File

@ -403,19 +403,6 @@ END {
stop(); stop();
} }
###############################################################################
# Aux. get module id
###############################################################################
my %module_id;
sub __get_module_id {
my ($dbh, $module_type) = @_;
if (!defined($module_id{$module_type})) {
$module_id{$module_type} = get_module_id($dbh, $module_type);
}
return $module_id{$module_type}
}
$SIG{INT} = \&stop; $SIG{INT} = \&stop;
$SIG{TERM} = \&stop; $SIG{TERM} = \&stop;