Add a new enterprise server to parse syslog's output.
Ref pandora_enterprise#1526.
This commit is contained in:
parent
29971f4d38
commit
18fdba9dd6
|
@ -569,3 +569,15 @@ wuxserver 0
|
|||
# Port of the Selenium Grid Server.
|
||||
#wux_port 4444
|
||||
|
||||
# Enable (1) or disable (0) the Pandora FMS Syslog Server (PANDORA FMS ENTERPRISE ONLY).
|
||||
syslogserver 1
|
||||
|
||||
# Full path to syslog's output file (PANDORA FMS ENTERPRISE ONLY).
|
||||
syslog_file /var/log/messages
|
||||
|
||||
# Number of threads for the Syslog Server (PANDORA FMS ENTERPRISE ONLY).
|
||||
syslog_threads 2
|
||||
|
||||
# Maximum number of lines queued by the Syslog Server's producer on each run (PANDORA FMS ENTERPRISE ONLY).
|
||||
syslog_max 65535
|
||||
|
||||
|
|
|
@ -454,6 +454,11 @@ sub pandora_load_config {
|
|||
$pa_config->{"wux_port"} = 4444; # 7.0
|
||||
$pa_config->{"wux_browser"} = "*firefox"; # 7.0
|
||||
|
||||
# Syslog Server
|
||||
$pa_config->{"syslogserver"} = 1; # 7.0.716
|
||||
$pa_config->{"syslog_file"} = '/var/log/messages/'; # 7.0.716
|
||||
$pa_config->{"syslog_max"} = 65535; # 7.0.716
|
||||
$pa_config->{"syslog_threads"} = 4; # 7.0.716
|
||||
|
||||
#$pa_config->{'include_agents'} = 0; #6.1
|
||||
#
|
||||
|
@ -1059,6 +1064,18 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^wux_browser\s+(.*)/i) {
|
||||
$pa_config->{'wux_browser'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^syslogserver\s+([0-1])/i) {
|
||||
$pa_config->{'syslogserver'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^syslog_file\s+(.*)/i) {
|
||||
$pa_config->{'syslog_file'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^syslog_max\s+([0-9]*)/i) {
|
||||
$pa_config->{'syslog_max'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^syslog_threads\s+([0-9]*)/i) {
|
||||
$pa_config->{'syslog_threads'}= clean_blank($1);
|
||||
}
|
||||
} # end of loop for parameter #
|
||||
|
||||
# Set to RDBMS' standard port
|
||||
|
|
|
@ -229,6 +229,7 @@ our @EXPORT = qw(
|
|||
pandora_self_monitoring
|
||||
pandora_process_policy_queue
|
||||
subst_alert_macros
|
||||
get_agent_from_alias
|
||||
get_agent_from_addr
|
||||
get_agent_from_name
|
||||
load_module_macros
|
||||
|
@ -243,7 +244,7 @@ our @EXPORT = qw(
|
|||
|
||||
# Some global variables
|
||||
our @DayNames = qw(sunday monday tuesday wednesday thursday friday saturday);
|
||||
our @ServerTypes = qw (dataserver networkserver snmpconsole reconserver pluginserver predictionserver wmiserver exportserver inventoryserver webserver eventserver icmpserver snmpserver satelliteserver transactionalserver mfserver syncserver wuxserver);
|
||||
our @ServerTypes = qw (dataserver networkserver snmpconsole reconserver pluginserver predictionserver wmiserver exportserver inventoryserver webserver eventserver icmpserver snmpserver satelliteserver transactionalserver mfserver syncserver wuxserver syslogserver);
|
||||
our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter');
|
||||
|
||||
# Event storm protection (no alerts or events)
|
||||
|
@ -252,6 +253,17 @@ our $EventStormProtection :shared = 0;
|
|||
# Current master server
|
||||
my $Master :shared = 0;
|
||||
|
||||
##########################################################################
|
||||
# Return the agent given the agent name.
|
||||
##########################################################################
|
||||
sub get_agent_from_alias ($$) {
|
||||
my ($dbh, $alias) = @_;
|
||||
|
||||
return undef if (! defined ($alias) || $alias eq '');
|
||||
|
||||
return get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE tagente.alias = ?', safe_input($alias));
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
# Return the agent given the IP address.
|
||||
##########################################################################
|
||||
|
|
|
@ -61,6 +61,7 @@ our @EXPORT = qw(
|
|||
MFSERVER
|
||||
TRANSACTIONALSERVER
|
||||
SYNCSERVER
|
||||
SYSLOGSERVER
|
||||
METACONSOLE_LICENSE
|
||||
WUXSERVER
|
||||
$DEVNULL
|
||||
|
@ -126,6 +127,7 @@ use constant TRANSACTIONALSERVER => 14;
|
|||
use constant MFSERVER => 15;
|
||||
use constant SYNCSERVER => 16;
|
||||
use constant WUXSERVER => 17;
|
||||
use constant SYSLOGSERVER => 18;
|
||||
|
||||
# Value for a metaconsole license type
|
||||
use constant METACONSOLE_LICENSE => 0x01;
|
||||
|
|
Loading…
Reference in New Issue