mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Merge branch '125-Gestión-recolección-y-correlación-de-logs-dev' into 'develop'
Resolve "Pandora7: Directorio de colecciones en gitlab" See merge request !777
This commit is contained in:
commit
b4dc6f4fb0
@ -691,10 +691,14 @@ function config_update_config () {
|
|||||||
$error_update[] = __('Name resolution for IP address');
|
$error_update[] = __('Name resolution for IP address');
|
||||||
break;
|
break;
|
||||||
case 'log':
|
case 'log':
|
||||||
if (!config_update_value ('log_dir', get_parameter('log_dir')))
|
if (!config_update_value ('elasticsearch_ip', get_parameter('elasticsearch_ip')))
|
||||||
$error_update[] = __('Netflow max lifetime');
|
$error_update[] = __('IP ElasticSearch server');
|
||||||
if (!config_update_value ('log_max_lifetime', (int)get_parameter('log_max_lifetime')))
|
if (!config_update_value ('elasticsearch_port', get_parameter('elasticsearch_port')))
|
||||||
$error_update[] = __('Log max lifetime');
|
$error_update[] = __('Port ElasticSearch server');
|
||||||
|
if (!config_update_value ('number_logs_viewed', (int)get_parameter('number_logs_viewed')))
|
||||||
|
$error_update[] = __('Number of logs viewed');
|
||||||
|
if (!config_update_value ('Days_purge_old_information', (int)get_parameter('Days_purge_old_information')))
|
||||||
|
$error_update[] = __('Days to purge old information');
|
||||||
break;
|
break;
|
||||||
case 'hist_db':
|
case 'hist_db':
|
||||||
if (!config_update_value ('history_db_enabled', get_parameter ('history_db_enabled')))
|
if (!config_update_value ('history_db_enabled', get_parameter ('history_db_enabled')))
|
||||||
@ -1013,17 +1017,20 @@ function config_process_config () {
|
|||||||
config_update_value ('auditdir',"/var/www/html/pandora_console");
|
config_update_value ('auditdir',"/var/www/html/pandora_console");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset ($config["log_dir"])) {
|
if (!isset ($config["elasticsearch_ip"])) {
|
||||||
if ($is_windows)
|
config_update_value ('elasticsearch_ip', "");
|
||||||
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\log';
|
|
||||||
else
|
|
||||||
$default = '/var/spool/pandora/data_in/log';
|
|
||||||
|
|
||||||
config_update_value ('log_dir', $default);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset ($config["log_max_lifetime"])) {
|
if (!isset ($config["elasticsearch_port"])) {
|
||||||
config_update_value ('log_max_lifetime', 15);
|
config_update_value ('elasticsearch_port', 9200);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset ($config["number_logs_viewed"])) {
|
||||||
|
config_update_value ('number_logs_viewed', 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset ($config["Days_purge_old_information"])) {
|
||||||
|
config_update_value ('Days_purge_old_information', 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset ($config["font_size"])) {
|
if (!isset ($config["font_size"])) {
|
||||||
|
@ -445,11 +445,16 @@ sub pandora_load_config {
|
|||||||
$pa_config->{"warmup_unknown_interval"} = 300; # 6.1
|
$pa_config->{"warmup_unknown_interval"} = 300; # 6.1
|
||||||
$pa_config->{"warmup_unknown_on"} = 1; # 6.1
|
$pa_config->{"warmup_unknown_on"} = 1; # 6.1
|
||||||
|
|
||||||
|
# Logstash
|
||||||
|
$pa_config->{"logstash_host"} = '';
|
||||||
|
$pa_config->{"logstash_port"} = 0;
|
||||||
|
|
||||||
$pa_config->{"wuxserver"} = 1; # 7.0
|
$pa_config->{"wuxserver"} = 1; # 7.0
|
||||||
$pa_config->{"wux_host"} = undef; # 7.0
|
$pa_config->{"wux_host"} = undef; # 7.0
|
||||||
$pa_config->{"wux_port"} = 4444; # 7.0
|
$pa_config->{"wux_port"} = 4444; # 7.0
|
||||||
$pa_config->{"wux_browser"} = "*firefox"; # 7.0
|
$pa_config->{"wux_browser"} = "*firefox"; # 7.0
|
||||||
|
|
||||||
|
|
||||||
#$pa_config->{'include_agents'} = 0; #6.1
|
#$pa_config->{'include_agents'} = 0; #6.1
|
||||||
#
|
#
|
||||||
# External .enc files for XML::Parser.
|
# External .enc files for XML::Parser.
|
||||||
@ -1035,6 +1040,13 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^dynamic_constant\s+([0-9]*)/i) {
|
elsif ($parametro =~ m/^dynamic_constant\s+([0-9]*)/i) {
|
||||||
$pa_config->{'dynamic_constant'}= clean_blank($1);
|
$pa_config->{'dynamic_constant'}= clean_blank($1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elsif ($parametro =~ m/^logstash_host\s+(.*)/i) {
|
||||||
|
$pa_config->{'logstash_host'}= clean_blank($1);
|
||||||
|
}
|
||||||
|
elsif ($parametro =~ m/^logstash_port\s+([0-9]*)/i) {
|
||||||
|
$pa_config->{'logstash_port'}= clean_blank($1);
|
||||||
|
}
|
||||||
elsif ($parametro =~ m/^wuxserver\s+([0-1]*)/i) {
|
elsif ($parametro =~ m/^wuxserver\s+([0-1]*)/i) {
|
||||||
$pa_config->{"wuxserver"} = clean_blank($1);
|
$pa_config->{"wuxserver"} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
@ -4671,6 +4671,8 @@ sub pandora_self_monitoring ($$) {
|
|||||||
WHERE token = 'db_maintance' AND value > UNIX_TIMESTAMP() - 86400");
|
WHERE token = 'db_maintance' AND value > UNIX_TIMESTAMP() - 86400");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$xml_output .= enterprise_hook("elasticsearch_performance", [$pa_config, $dbh]);
|
||||||
|
|
||||||
$xml_output .=" <module>";
|
$xml_output .=" <module>";
|
||||||
$xml_output .=" <name>Database Maintenance</name>";
|
$xml_output .=" <name>Database Maintenance</name>";
|
||||||
$xml_output .=" <type>generic_proc</type>";
|
$xml_output .=" <type>generic_proc</type>";
|
||||||
@ -5466,3 +5468,4 @@ L<DBI>, L<XML::Simple>, L<HTML::Entities>, L<Time::Local>, L<POSIX>, L<PandoraFM
|
|||||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user