Merge branch 'ent-13171-configuracion-de-recepcion-de-logs' into 'develop'
Ent 13171 configuracion de recepcion de logs See merge request artica/pandorafms!7131
This commit is contained in:
commit
8195f082ea
|
@ -111,11 +111,8 @@ if (enterprise_installed()) {
|
|||
array_push($menu_tabs, $menu_tab_url);
|
||||
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=hist_db').'">'.__('History database').'</a>';
|
||||
array_push($menu_tabs, $menu_tab_url);
|
||||
|
||||
if ($config['log_collector']) {
|
||||
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=log').'">'.__('Log collector').'</a>';
|
||||
array_push($menu_tabs, $menu_tab_url);
|
||||
}
|
||||
$menu_tab_url = '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=log').'">'.__('Log collector').'</a>';
|
||||
array_push($menu_tabs, $menu_tab_url);
|
||||
}
|
||||
|
||||
$buttons['auth'] = [
|
||||
|
@ -422,8 +419,14 @@ switch ($section) {
|
|||
$help_header = '';
|
||||
break;
|
||||
|
||||
case 'log':
|
||||
$buttons['log']['active'] = true;
|
||||
$subpage = __('Log Collector');
|
||||
$help_header = 'opensearch_installation';
|
||||
break;
|
||||
|
||||
default:
|
||||
$subpage = 'seccion: ';
|
||||
$subpage = '';
|
||||
// Default.
|
||||
break;
|
||||
}
|
||||
|
@ -432,7 +435,7 @@ $dots = dot_tab($menu_tabs);
|
|||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Setup').' » '.$subpage,
|
||||
$subpage,
|
||||
'',
|
||||
false,
|
||||
$help_header,
|
||||
|
|
|
@ -250,6 +250,13 @@ class ConsoleSupervisor
|
|||
|
||||
$this->checkAllowOverrideEnabled();
|
||||
|
||||
/*
|
||||
* Check if OpenSearch is configured and log collector enabled
|
||||
* NOTIF.OPENSEARCH.CONSOLELOG
|
||||
*/
|
||||
|
||||
$this->checkOpenSearchLogCollector();
|
||||
|
||||
/*
|
||||
* Check if the Pandora Console log
|
||||
* file remains in old location.
|
||||
|
@ -540,6 +547,12 @@ class ConsoleSupervisor
|
|||
|
||||
$this->checkUpdateManagerRegistration();
|
||||
|
||||
/*
|
||||
* Check if OpenSearch is configured and log collector enabled
|
||||
* NOTIF.OPENSEARCH.CONSOLELOG
|
||||
*/
|
||||
$this->checkOpenSearchLogCollector();
|
||||
|
||||
/*
|
||||
* Check if has API access.
|
||||
* NOTIF.API.ACCESS
|
||||
|
@ -2540,6 +2553,35 @@ class ConsoleSupervisor
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if OpenSearch is configured and log collector enabled.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function checkOpenSearchLogCollector()
|
||||
{
|
||||
global $config;
|
||||
include_once $config['homedir'].'/include/functions_update_manager.php';
|
||||
$login = get_parameter('login', false);
|
||||
|
||||
if ($config['log_collector'] !== '1' && empty($config['elasticsearch_ip']) === false && empty($config['elasticsearch_port']) === false) {
|
||||
if (update_manager_verify_registration() === false) {
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.OPENSEARCH.CONSOLELOG',
|
||||
'title' => __('The Log collector is not enabled'),
|
||||
'message' => __('The OpenSearch is defined but the log collector is not enabled.'),
|
||||
'url' => '__url__/index.php?sec=gsetup&sec2=godmode/setup/setup§ion=log',
|
||||
'icon_notification' => self::ICON_QUESTION,
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->cleanNotifications('NOTIF.OPENSEARCH.CONSOLELOG');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if has access to the API
|
||||
*
|
||||
|
|
|
@ -5617,6 +5617,13 @@ function get_help_info($section_name)
|
|||
}
|
||||
break;
|
||||
|
||||
case 'opensearch_installation':
|
||||
if ($es) {
|
||||
$result .= 'pandorafms/technical_annexes/38_opensearch_installation#instalacion';
|
||||
} else {
|
||||
$result .= 'pandorafms/technical_annexes/38_opensearch_installation#installation';
|
||||
}
|
||||
|
||||
case 'servers_ha_clusters_tab':
|
||||
if ($es) {
|
||||
$result .= 'pandorafms/complex_environments_and_optimization/06_ha#alta_disponibilidad_del_servidor_de_datos';
|
||||
|
|
|
@ -147,6 +147,7 @@ function notifications_get_subtypes(?string $source=null)
|
|||
'NOTIF.METACONSOLE.DB_CONNECTION',
|
||||
'NOTIF.DOWNTIME',
|
||||
'NOTIF.UPDATEMANAGER.REGISTRATION',
|
||||
'NOTIF.OPENSEARCH.CONSOLELOG',
|
||||
'NOTIF.API.ACCESS',
|
||||
'NOTIF.MISC.EVENTSTORMPROTECTION',
|
||||
'NOTIF.MISC.DEVELOPBYPASS',
|
||||
|
|
Loading…
Reference in New Issue