Pandora HA verified
This commit is contained in:
parent
94cd4c96dd
commit
04a9b10904
|
@ -12,7 +12,6 @@ use Getopt::Std;
|
|||
use POSIX qw(setsid strftime :sys_wait_h);
|
||||
use threads;
|
||||
use threads::shared;
|
||||
use Storable;
|
||||
use File::Path qw(rmtree);
|
||||
|
||||
# Default lib dir for Pandora FMS RPM and DEB packages.
|
||||
|
@ -296,6 +295,21 @@ sub ha_main($) {
|
|||
|
||||
while ($Running) {
|
||||
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.
|
||||
log_message($conf, 'LOG', 'Checking the pandora_server service.');
|
||||
|
||||
|
@ -321,7 +335,10 @@ sub ha_main($) {
|
|||
# Exit current eval.
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
# Synchronize database.
|
||||
enterprise_hook('pandoraha_sync_node', [$conf, $dbh]);
|
||||
|
||||
# Monitoring.
|
||||
enterprise_hook('pandoraha_monitoring', [$conf, $dbh]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue