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');
|
||||
break;
|
||||
case 'log':
|
||||
if (!config_update_value ('log_dir', get_parameter('log_dir')))
|
||||
$error_update[] = __('Netflow max lifetime');
|
||||
if (!config_update_value ('log_max_lifetime', (int)get_parameter('log_max_lifetime')))
|
||||
$error_update[] = __('Log max lifetime');
|
||||
if (!config_update_value ('elasticsearch_ip', get_parameter('elasticsearch_ip')))
|
||||
$error_update[] = __('IP ElasticSearch server');
|
||||
if (!config_update_value ('elasticsearch_port', get_parameter('elasticsearch_port')))
|
||||
$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;
|
||||
case 'hist_db':
|
||||
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");
|
||||
}
|
||||
|
||||
if (!isset ($config["log_dir"])) {
|
||||
if ($is_windows)
|
||||
$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["elasticsearch_ip"])) {
|
||||
config_update_value ('elasticsearch_ip', "");
|
||||
}
|
||||
|
||||
if (!isset ($config["log_max_lifetime"])) {
|
||||
config_update_value ('log_max_lifetime', 15);
|
||||
if (!isset ($config["elasticsearch_port"])) {
|
||||
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"])) {
|
||||
|
|
|
@ -445,11 +445,16 @@ sub pandora_load_config {
|
|||
$pa_config->{"warmup_unknown_interval"} = 300; # 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->{"wux_host"} = undef; # 7.0
|
||||
$pa_config->{"wux_port"} = 4444; # 7.0
|
||||
$pa_config->{"wux_browser"} = "*firefox"; # 7.0
|
||||
|
||||
|
||||
#$pa_config->{'include_agents'} = 0; #6.1
|
||||
#
|
||||
# External .enc files for XML::Parser.
|
||||
|
@ -1035,6 +1040,13 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^dynamic_constant\s+([0-9]*)/i) {
|
||||
$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) {
|
||||
$pa_config->{"wuxserver"} = clean_blank($1);
|
||||
}
|
||||
|
|
|
@ -4670,6 +4670,8 @@ sub pandora_self_monitoring ($$) {
|
|||
FROM tconfig
|
||||
WHERE token = 'db_maintance' AND value > UNIX_TIMESTAMP() - 86400");
|
||||
}
|
||||
|
||||
$xml_output .= enterprise_hook("elasticsearch_performance", [$pa_config, $dbh]);
|
||||
|
||||
$xml_output .=" <module>";
|
||||
$xml_output .=" <name>Database Maintenance</name>";
|
||||
|
@ -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
|
||||
|
||||
=cut
|
||||
|
||||
|
|
Loading…
Reference in New Issue