Addded blacklist and whitelist to syslogserver to server conf

This commit is contained in:
Calvo 2023-07-12 18:06:07 +02:00
parent 08b7beb9c7
commit 5b68fcdefe
3 changed files with 21 additions and 0 deletions

View File

@ -659,6 +659,12 @@ syslog_threads 2
# Maximum number of lines queued by the Syslog Server's producer on each run (PANDORA FMS ENTERPRISE ONLY).
syslog_max 65535
# Blacklist regexp filter for the Syslog Server (PANDORA FMS ENTERPRISE ONLY).
# syslog_blacklist [regex]
# Blacklist regexp filter for the Syslog Server (PANDORA FMS ENTERPRISE ONLY).
# syslog_whitelist .*
# Sync Server
#syncserver

View File

@ -658,6 +658,12 @@ syslog_threads 2
# Maximum number of lines queued by the Syslog Server's producer on each run (PANDORA FMS ENTERPRISE ONLY).
syslog_max 65535
# Blacklist regexp filter for the Syslog Server (PANDORA FMS ENTERPRISE ONLY).
# syslog_blacklist [regex]
# Blacklist regexp filter for the Syslog Server (PANDORA FMS ENTERPRISE ONLY).
# syslog_whitelist .*
# Sync Server
#syncserver

View File

@ -515,6 +515,9 @@ sub pandora_load_config {
$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->{"syslog_blacklist"} = undef; # 7.0.773
$pa_config->{"syslog_whitelist"} = undef; # 7.0 773
# External .enc files for XML::Parser.
$pa_config->{"enc_dir"} = ""; # > 6.0SP4
@ -1254,6 +1257,12 @@ sub pandora_load_config {
elsif ($parametro =~ m/^syslog_threads\s+([0-9]*)/i) {
$pa_config->{'syslog_threads'}= clean_blank($1);
}
elsif ($parametro =~ m/^syslog_blacklist\s+(.*)/i) {
$pa_config->{'syslog_blacklist'}= clean_blank($1);
}
elsif ($parametro =~ m/^syslog_whitelist\s+(.*)/i) {
$pa_config->{'syslog_whitelist'}= clean_blank($1);
}
elsif ($parametro =~ m/^thread_log\s+([0-1])/i) {
$pa_config->{'thread_log'}= clean_blank($1);
}