pandora_ha enterprise components fixed
This commit is contained in:
parent
b110fde614
commit
7e5a082e22
|
@ -915,8 +915,9 @@ sub float_equal {
|
||||||
# Tries to load the PandoraEnterprise module. Must be called once before
|
# Tries to load the PandoraEnterprise module. Must be called once before
|
||||||
# enterprise_hook ().
|
# enterprise_hook ().
|
||||||
################################################################################
|
################################################################################
|
||||||
sub enterprise_load ($) {
|
sub enterprise_load ($;$) {
|
||||||
my $pa_config = shift;
|
my $pa_config = shift;
|
||||||
|
my $muted = shift;
|
||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
|
|
||||||
|
@ -944,7 +945,7 @@ sub enterprise_load ($) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialize the enterprise module.
|
# Initialize the enterprise module.
|
||||||
PandoraFMS::Enterprise::init($pa_config);
|
PandoraFMS::Enterprise::init($pa_config, $muted);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,6 +296,21 @@ sub ha_main($) {
|
||||||
|
|
||||||
while ($Running) {
|
while ($Running) {
|
||||||
eval {
|
eval {
|
||||||
|
eval {
|
||||||
|
local $SIG{__DIE__};
|
||||||
|
# Load enterprise components.
|
||||||
|
enterprise_load($conf, 1);
|
||||||
|
|
||||||
|
# Register Enterprise logger
|
||||||
|
enterprise_hook('pandoraha_logger', [\&log_message]);
|
||||||
|
log_message($conf, 'LOG', 'Enterprise capabilities loaded');
|
||||||
|
|
||||||
|
};
|
||||||
|
if ($@) {
|
||||||
|
# No enterprise capabilities.
|
||||||
|
log_message($conf, 'LOG', 'No enterprise capabilities');
|
||||||
|
}
|
||||||
|
|
||||||
# Start the Pandora FMS server if needed.
|
# Start the Pandora FMS server if needed.
|
||||||
log_message($conf, 'LOG', 'Checking the pandora_server service.');
|
log_message($conf, 'LOG', 'Checking the pandora_server service.');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue