Introducing to Pandora FMS Transactional Server

This commit is contained in:
fbsanchez 2016-06-13 13:51:55 +02:00
parent 9663ddbe64
commit 32345e07d5
3 changed files with 25 additions and 0 deletions

View File

@ -37,6 +37,7 @@ use PandoraFMS::ReconServer;
use PandoraFMS::WMIServer;
use PandoraFMS::PluginServer;
use PandoraFMS::PredictionServer;
use PandoraFMS::TransactionalServer;
# Constants for Win32 services.
use constant WIN32_SERVICE_STOPPED => 0x01;
@ -116,6 +117,7 @@ sub pandora_startup () {
push (@Servers, new PandoraFMS::WMIServer (\%Config, $DBH));
push (@Servers, new PandoraFMS::PluginServer (\%Config, $DBH));
push (@Servers, new PandoraFMS::PredictionServer (\%Config, $DBH));
push (@Servers, new PandoraFMS::TransactionalServer (\%Config, $DBH));
} else {
# Metaconsole service modules are run by the prediction server
push (@Servers, new PandoraFMS::PredictionServer (\%Config, $DBH));

View File

@ -208,6 +208,10 @@ sub pandora_load_config {
$pa_config->{"exportserver"} = 1; # default
$pa_config->{"inventoryserver"} = 1; # default
$pa_config->{"webserver"} = 1; # 3.0
$pa_config->{"transactionalserver"} = 0; # Default 0, introduced on 6.1
$pa_config->{"transactional_threads"} = 1; # Default 1, introduced on 6.1
$pa_config->{"transactional_threshold"} = 2; # Default 2, introduced on 6.1
$pa_config->{"transactional_pool"} = $pa_config->{"incomingdir"} . "/" . "trans"; # Default, introduced on 6.1
$pa_config->{'snmp_logfile'} = "/var/log/pandora_snmptrap.log";
$pa_config->{"network_threads"} = 3; # Fixed default
$pa_config->{"keepalive"} = 60; # 60 Seconds initially for server keepalive
@ -584,6 +588,23 @@ sub pandora_load_config {
elsif ($parametro =~ m/^webserver\s([0-9]*)/i) {
$pa_config->{'webserver'}= clean_blank($1);
}
elsif ($parametro =~ m/^transactionalserver\s([0-9]*)/i) {
$pa_config->{'transactionalserver'}= clean_blank($1);
}
elsif ($parametro =~ m/^transactional_threads\s([0-9]*)/i) {
$pa_config->{'transactional_threads'}= clean_blank($1);
}
elsif ($parametro =~ m/^transactional_threshold\s([0-9]*)/i) {
$pa_config->{'transactional_threshold'}= clean_blank($1);
}
if ($parametro =~ m/^transactional_pool\s(.*)/i) {
$tbuf= clean_blank($1);
if ($tbuf =~ m/^\.(.*)/){
$pa_config->{"transactional_pool"} = $pa_config->{"incomingdir"} . "/" . $1;
} else {
$pa_config->{"transactional_pool"} = $pa_config->{"incomingdir"} . "/" . $tbuf;
}
}
elsif ($parametro =~ m/^eventserver\s([0-9]*)/i) {
$pa_config->{'eventserver'}= clean_blank($1);
}

View File

@ -57,6 +57,7 @@ our @EXPORT = qw(
ICMPSERVER
SNMPSERVER
SATELLITESERVER
TRANSACTIONALSERVER
METACONSOLE_LICENSE
$DEVNULL
RECOVERED_ALERT
@ -112,6 +113,7 @@ use constant EVENTSERVER => 10;
use constant ICMPSERVER => 11;
use constant SNMPSERVER => 12;
use constant SATELLITESERVER => 13;
use constant TRANSACTIONALSERVER => 14;
# Value for a metaconsole license type
use constant METACONSOLE_LICENSE => 0x01;