Added support for metaconsole servers.

This commit is contained in:
Ramon Novoa 2015-04-15 11:02:44 +02:00
parent db3e276195
commit 79afef8cf8
2 changed files with 18 additions and 8 deletions

View File

@ -104,6 +104,7 @@ sub pandora_startup () {
pandora_audit (\%Config, 'Pandora FMS Server Daemon starting', 'SYSTEM', 'System', $DBH);
# Load servers
if ($Config{"license_type"} != METACONSOLE_LICENSE) {
pandora_reset_server (\%Config, $DBH);
push (@Servers, new PandoraFMS::DataServer (\%Config, $DBH));
push (@Servers, new PandoraFMS::NetworkServer (\%Config, $DBH));
@ -112,7 +113,12 @@ sub pandora_startup () {
push (@Servers, new PandoraFMS::WMIServer (\%Config, $DBH));
push (@Servers, new PandoraFMS::PluginServer (\%Config, $DBH));
push (@Servers, new PandoraFMS::PredictionServer (\%Config, $DBH));
} else {
# Metaconsole service modules are run by the prediction server
push (@Servers, new PandoraFMS::PredictionServer (\%Config, $DBH));
}
# There are enterprise metaconsole servers!
enterprise_hook('load_enterprise_servers', [\@Servers, \%Config, $DBH]);
# Start the netflow daemon if necessary

View File

@ -56,6 +56,7 @@ our @EXPORT = qw(
EVENTSERVER
ICMPSERVER
SNMPSERVER
METACONSOLE_LICENSE
$DEVNULL
cron_get_closest_in_range
cron_next_execution
@ -106,6 +107,9 @@ use constant EVENTSERVER => 10;
use constant ICMPSERVER => 11;
use constant SNMPSERVER => 12;
# Value for a metaconsole license type
use constant METACONSOLE_LICENSE => 0x01;
# /dev/null
our $DEVNULL = ($^O eq 'MSWin32') ? '/Nul' : '/dev/null';