mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
Merge branch 'develop' into 'ent-10563-mejoras-personalizacion-interfaz'
# Conflicts: # pandora_console/godmode/agentes/module_manager.php
This commit is contained in:
commit
82f6c6c0da
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.772-230630
|
Version: 7.0NG.772-230703
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.772-230630"
|
pandora_version="7.0NG.772-230703"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
@ -1031,7 +1031,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.772';
|
use constant AGENT_VERSION => '7.0NG.772';
|
||||||
use constant AGENT_BUILD => '230630';
|
use constant AGENT_BUILD => '230703';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.772
|
||||||
%define release 230630
|
%define release 230703
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.772
|
||||||
%define release 230630
|
%define release 230703
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.772"
|
PI_VERSION="7.0NG.772"
|
||||||
PI_BUILD="230630"
|
PI_BUILD="230703"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{230630}
|
{230703}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.772 Build 230630")
|
#define PANDORA_VERSION ("7.0NG.772 Build 230703")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.772(Build 230630))"
|
VALUE "ProductVersion", "(7.0NG.772(Build 230703))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.772-230630
|
Version: 7.0NG.772-230703
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.772-230630"
|
pandora_version="7.0NG.772-230703"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -929,7 +929,7 @@ if ($agents !== false) {
|
|||||||
[
|
[
|
||||||
'href' => ui_get_full_url(
|
'href' => ui_get_full_url(
|
||||||
sprintf(
|
sprintf(
|
||||||
'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&%s_agent=%s&group_id=%s&recursion=%s&search=%s&offset=%s&sort_field=%s&sort=%s&disabled=%s',
|
'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&%s_agent=%s&group_id=%s&recursion=%s&search=%s&offset=%s&sort_field=%s&sort=%s&disabled=%s&os=%s',
|
||||||
$agentDisableEnableAction,
|
$agentDisableEnableAction,
|
||||||
$agent['id_agente'],
|
$agent['id_agente'],
|
||||||
$ag_group,
|
$ag_group,
|
||||||
@ -938,7 +938,8 @@ if ($agents !== false) {
|
|||||||
'',
|
'',
|
||||||
$sortField,
|
$sortField,
|
||||||
$sort,
|
$sort,
|
||||||
$disabled
|
$disabled,
|
||||||
|
$os
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'onClick' => ($agent['id_os'] === CLUSTER_OS_ID) ? sprintf('if (!confirm(\'%s\')) return false', $agentDisableEnableCaption) : 'return true;',
|
'onClick' => ($agent['id_os'] === CLUSTER_OS_ID) ? sprintf('if (!confirm(\'%s\')) return false', $agentDisableEnableCaption) : 'return true;',
|
||||||
|
@ -32,6 +32,7 @@ require_once $config['homedir'].'/include/functions_categories.php';
|
|||||||
require_once $config['homedir'].'/include/graphs/functions_d3.php';
|
require_once $config['homedir'].'/include/graphs/functions_d3.php';
|
||||||
|
|
||||||
use PandoraFMS\Agent;
|
use PandoraFMS\Agent;
|
||||||
|
use Psr\Log\NullLogger;
|
||||||
|
|
||||||
include_javascript_d3();
|
include_javascript_d3();
|
||||||
|
|
||||||
@ -950,6 +951,15 @@ $table_advanced->data['tags_module_parent'][0] .= html_print_div(
|
|||||||
|
|
||||||
if ((bool) $in_policies_page === false) {
|
if ((bool) $in_policies_page === false) {
|
||||||
// Cannot select the current module to be itself parent.
|
// Cannot select the current module to be itself parent.
|
||||||
|
if ($id_agent_module !== 0) {
|
||||||
|
$module_parent_filter['tagente_modulo.id_agente_modulo'] = '<>'.$id_agent_module;
|
||||||
|
$array_parent_module_id = [];
|
||||||
|
get_agent_module_childs($array_parent_module_id, $id_agent_module, $id_agente);
|
||||||
|
} else {
|
||||||
|
$module_parent_filter = [];
|
||||||
|
$array_parent_module_id = [];
|
||||||
|
}
|
||||||
|
|
||||||
$module_parent_filter = ($id_agent_module) ? ['tagente_modulo.id_agente_modulo' => '<>'.$id_agent_module] : [];
|
$module_parent_filter = ($id_agent_module) ? ['tagente_modulo.id_agente_modulo' => '<>'.$id_agent_module] : [];
|
||||||
$table_advanced->data['caption_tags_module_parent'][1] = __('Module parent');
|
$table_advanced->data['caption_tags_module_parent'][1] = __('Module parent');
|
||||||
// TODO. Review cause dont know not works.
|
// TODO. Review cause dont know not works.
|
||||||
@ -965,6 +975,13 @@ if ((bool) $in_policies_page === false) {
|
|||||||
false,
|
false,
|
||||||
$module_parent_filter
|
$module_parent_filter
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (empty($array_parent_module_id) === false) {
|
||||||
|
foreach ($array_parent_module_id as $key => $value) {
|
||||||
|
unset($modules_can_be_parent[$value]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the user cannot have access to parent module, only print the name.
|
// If the user cannot have access to parent module, only print the name.
|
||||||
if ((int) $parent_module_id !== 0
|
if ((int) $parent_module_id !== 0
|
||||||
&& in_array($parent_module_id, array_keys($modules_can_be_parent)) === true
|
&& in_array($parent_module_id, array_keys($modules_can_be_parent)) === true
|
||||||
|
@ -240,7 +240,7 @@ $snmp_versions['3'] = 'v. 3';
|
|||||||
$snmpVersionsInput = html_print_select(
|
$snmpVersionsInput = html_print_select(
|
||||||
$snmp_versions,
|
$snmp_versions,
|
||||||
'snmp_version',
|
'snmp_version',
|
||||||
($id_module_type >= 15 && $id_module_type <= 18) ? $snmp_version : 0,
|
($id_module_type >= 15 && $id_module_type <= 18) ? $snmp_version : '2c',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
|
@ -107,6 +107,8 @@ if (is_ajax() === true) {
|
|||||||
// Ids of agents to be include in the SQL clause as id_agent IN ().
|
// Ids of agents to be include in the SQL clause as id_agent IN ().
|
||||||
$filter_agents_json = (string) get_parameter('filter_agents_json', '');
|
$filter_agents_json = (string) get_parameter('filter_agents_json', '');
|
||||||
$status_agents = (int) get_parameter('status_agents', AGENT_STATUS_ALL);
|
$status_agents = (int) get_parameter('status_agents', AGENT_STATUS_ALL);
|
||||||
|
$os_agent = (int) get_parameter('os_agent', 0);
|
||||||
|
$os_agent_version = (string) get_parameter('os_agent_version', '');
|
||||||
// Juanma (22/05/2014) Fix: If setted remove void agents from result
|
// Juanma (22/05/2014) Fix: If setted remove void agents from result
|
||||||
// (by default and for compatibility show void agents).
|
// (by default and for compatibility show void agents).
|
||||||
$show_void_agents = (int) get_parameter('show_void_agents', 1);
|
$show_void_agents = (int) get_parameter('show_void_agents', 1);
|
||||||
@ -152,6 +154,14 @@ if (is_ajax() === true) {
|
|||||||
$filter['status'] = $status_agents;
|
$filter['status'] = $status_agents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($os_agent !== 0) {
|
||||||
|
$filter['id_os'] = $os_agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($os_agent_version !== '') {
|
||||||
|
$filter['os_version'] = $os_agent_version;
|
||||||
|
}
|
||||||
|
|
||||||
if ($id_os !== 0) {
|
if ($id_os !== 0) {
|
||||||
$filter['id_os'] = $id_os;
|
$filter['id_os'] = $id_os;
|
||||||
}
|
}
|
||||||
|
@ -592,13 +592,13 @@ if ((bool) $id !== false || $new_component
|
|||||||
|
|
||||||
|
|
||||||
$search_id_group = (int) get_parameter('search_id_group');
|
$search_id_group = (int) get_parameter('search_id_group');
|
||||||
|
$group_recursive = (bool) get_parameter_switch('group_recursive', false);
|
||||||
$search_string = (string) get_parameter('search_string');
|
$search_string = (string) get_parameter('search_string');
|
||||||
|
|
||||||
$offset = (int) get_parameter('offset');
|
$offset = (int) get_parameter('offset');
|
||||||
$url = ui_get_url_refresh(
|
$url = ui_get_url_refresh(
|
||||||
[
|
[
|
||||||
'offset' => $offset,
|
'search_string' => urlencode(io_safe_output($search_string)),
|
||||||
'search_string' => $search_string,
|
|
||||||
'search_id_group' => $search_id_group,
|
'search_id_group' => $search_id_group,
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
],
|
],
|
||||||
@ -662,7 +662,15 @@ $table->data[0][] = html_print_label_input_block(
|
|||||||
'width: 100%'
|
'width: 100%'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$table->data[0][] = html_print_label_input_block(
|
||||||
|
__('Recursive'),
|
||||||
|
html_print_checkbox_switch(
|
||||||
|
'group_recursive',
|
||||||
|
1,
|
||||||
|
$group_recursive,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
$table->data[0][] = html_print_label_input_block(
|
$table->data[0][] = html_print_label_input_block(
|
||||||
__('Free Search'),
|
__('Free Search'),
|
||||||
html_print_input_text(
|
html_print_input_text(
|
||||||
@ -678,7 +686,8 @@ $table->data[0][] = html_print_label_input_block(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$toggleFilters = '<form class="filters_form" method="POST" action="'.$url.'">';
|
$filter_action_url = 'index.php?sec='.$sec.'&sec2=godmode/modules/manage_network_components&id='.$component['id_nc'].'&search_string='.urlencode(io_safe_output($search_string)).'&search_id_group'.$search_id_group.'&pure='.$pure;
|
||||||
|
$toggleFilters = '<form class="filters_form" method="POST" action="'.$filter_action_url.'">';
|
||||||
$toggleFilters .= html_print_table($table, true);
|
$toggleFilters .= html_print_table($table, true);
|
||||||
$toggleFilters .= html_print_div(
|
$toggleFilters .= html_print_div(
|
||||||
[
|
[
|
||||||
@ -712,8 +721,12 @@ ui_toggle(
|
|||||||
|
|
||||||
$filter = [];
|
$filter = [];
|
||||||
if ($search_id_group) {
|
if ($search_id_group) {
|
||||||
|
if ($group_recursive === true) {
|
||||||
|
$filter['id_group'] = network_component_get_groups_recursive($search_id_group);
|
||||||
|
} else {
|
||||||
$filter['id_group'] = $search_id_group;
|
$filter['id_group'] = $search_id_group;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($search_string != '') {
|
if ($search_string != '') {
|
||||||
$filter[] = '(name LIKE '."'%".$search_string."%'".'OR description LIKE '."'%".$search_string."%'".'OR tcp_send LIKE '."'%".$search_string."%'".'OR tcp_rcv LIKE '."'%".$search_string."%'".')';
|
$filter[] = '(name LIKE '."'%".$search_string."%'".'OR description LIKE '."'%".$search_string."%'".'OR tcp_send LIKE '."'%".$search_string."%'".'OR tcp_rcv LIKE '."'%".$search_string."%'".')';
|
||||||
@ -725,7 +738,7 @@ $total_components = network_components_get_network_components(
|
|||||||
'COUNT(*) AS total'
|
'COUNT(*) AS total'
|
||||||
);
|
);
|
||||||
$total_components = $total_components[0]['total'];
|
$total_components = $total_components[0]['total'];
|
||||||
$offset_delete = ($offset >= ($total_components - 1)) ? ($offset - $config['block_size']) : $offset;
|
$offset_delete = ($offset > 0 && $offset >= ($total_components - 1)) ? ($offset - $config['block_size']) : $offset;
|
||||||
$filter['offset'] = (int) get_parameter('offset');
|
$filter['offset'] = (int) get_parameter('offset');
|
||||||
$filter['limit'] = (int) $config['block_size'];
|
$filter['limit'] = (int) $config['block_size'];
|
||||||
$components = network_components_get_network_components(
|
$components = network_components_get_network_components(
|
||||||
|
@ -1954,7 +1954,7 @@ $class = 'databox filters';
|
|||||||
$modulegroup,
|
$modulegroup,
|
||||||
$id_agents,
|
$id_agents,
|
||||||
!$selection_a_m,
|
!$selection_a_m,
|
||||||
true
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1252,7 +1252,10 @@ if (check_login()) {
|
|||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/event-history.svg',
|
'images/event-history.svg',
|
||||||
true,
|
true,
|
||||||
[ 'class' => 'main_menu_icon' ]
|
[
|
||||||
|
'title' => __('Event history'),
|
||||||
|
'class' => 'main_menu_icon forced_title',
|
||||||
|
]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -1267,7 +1270,10 @@ if (check_login()) {
|
|||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/module-graph.svg',
|
'images/module-graph.svg',
|
||||||
true,
|
true,
|
||||||
[ 'class' => 'main_menu_icon' ]
|
[
|
||||||
|
'title' => __('Module graph'),
|
||||||
|
'class' => 'main_menu_icon forced_title',
|
||||||
|
]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -1284,7 +1290,10 @@ if (check_login()) {
|
|||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/simple-value.svg',
|
'images/simple-value.svg',
|
||||||
true,
|
true,
|
||||||
[ 'class' => 'main_menu_icon' ]
|
[
|
||||||
|
'title' => __('Module detail'),
|
||||||
|
'class' => 'main_menu_icon forced_title',
|
||||||
|
]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -1320,7 +1329,10 @@ if (check_login()) {
|
|||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
$imgaction,
|
$imgaction,
|
||||||
true,
|
true,
|
||||||
[ 'class' => 'main_menu_icon' ]
|
[
|
||||||
|
'title' => __('Force remote check'),
|
||||||
|
'class' => 'main_menu_icon forced_title',
|
||||||
|
]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -1337,7 +1349,10 @@ if (check_login()) {
|
|||||||
'content' => html_print_image(
|
'content' => html_print_image(
|
||||||
'images/edit.svg',
|
'images/edit.svg',
|
||||||
true,
|
true,
|
||||||
[ 'class' => 'main_menu_icon' ]
|
[
|
||||||
|
'title' => __('Edit configuration'),
|
||||||
|
'class' => 'main_menu_icon forced_title',
|
||||||
|
]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC230630';
|
$build_version = 'PC230703';
|
||||||
$pandora_version = 'v7.0NG.772';
|
$pandora_version = 'v7.0NG.772';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -2843,7 +2843,7 @@ function config_process_config()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['email_from_dir'])) {
|
if (!isset($config['email_from_dir'])) {
|
||||||
config_update_value('email_from_dir', 'pandora@pandorafms.com/community/');
|
config_update_value('email_from_dir', 'pandora@pandorafms.com');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['email_from_name'])) {
|
if (!isset($config['email_from_name'])) {
|
||||||
|
@ -4353,7 +4353,7 @@ function events_page_details($event, $server_id=0)
|
|||||||
} else if (can_user_access_node() && is_metaconsole()) {
|
} else if (can_user_access_node() && is_metaconsole()) {
|
||||||
// Workaround to pass login hash data in POST body instead of directly in the URL.
|
// Workaround to pass login hash data in POST body instead of directly in the URL.
|
||||||
parse_str($hashstring, $url_hash_array);
|
parse_str($hashstring, $url_hash_array);
|
||||||
$redirection_form = "<form id='agent-redirection' method='POST' action='".$serverstring."index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$event['id_agente']."'>";
|
$redirection_form = "<form id='agent-redirection' method='POST' action='".$serverstring.'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$event['id_agente']."'>";
|
||||||
$redirection_form .= html_print_input_hidden(
|
$redirection_form .= html_print_input_hidden(
|
||||||
'loginhash',
|
'loginhash',
|
||||||
$url_hash_array['loginhash'],
|
$url_hash_array['loginhash'],
|
||||||
|
@ -214,10 +214,33 @@ function get_table_inputs_masive_agents($params)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[3][0] = __('Agents');
|
$os_list = os_get_os(true);
|
||||||
$table->data[3][0] .= '<span id="agent_loading" class="invisible">';
|
|
||||||
$table->data[3][0] .= html_print_image('images/spinner.png', true);
|
$table->data[3][0] = __('OS');
|
||||||
$table->data[3][0] .= '</span>';
|
$table->data[3][1] = html_print_select(
|
||||||
|
$os_list,
|
||||||
|
'os_agent',
|
||||||
|
'selected',
|
||||||
|
'',
|
||||||
|
__('All'),
|
||||||
|
'',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[3][2] = __('OS Version');
|
||||||
|
$table->data[3][3] = html_print_input_text(
|
||||||
|
'os_agent_version',
|
||||||
|
'',
|
||||||
|
__('Select OS version'),
|
||||||
|
35,
|
||||||
|
255,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[4][0] = __('Agents');
|
||||||
|
$table->data[4][0] .= '<span id="agent_loading" class="invisible">';
|
||||||
|
$table->data[4][0] .= html_print_image('images/spinner.png', true);
|
||||||
|
$table->data[4][0] .= '</span>';
|
||||||
|
|
||||||
$agents = [];
|
$agents = [];
|
||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
@ -228,7 +251,7 @@ function get_table_inputs_masive_agents($params)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[3][1] = html_print_select(
|
$table->data[4][1] = html_print_select(
|
||||||
$agents,
|
$agents,
|
||||||
'id_agents[]',
|
'id_agents[]',
|
||||||
0,
|
0,
|
||||||
|
@ -3676,6 +3676,10 @@ function get_modules_agents(
|
|||||||
implode(',', $id_agents)
|
implode(',', $id_agents)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($rows === false) {
|
||||||
|
$rows = [];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$rows = [];
|
$rows = [];
|
||||||
}
|
}
|
||||||
@ -4655,3 +4659,26 @@ function policies_type_modules_availables(string $sec2): array
|
|||||||
|
|
||||||
return $modules;
|
return $modules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function get_agent_module_childs(
|
||||||
|
&$array_parent_module_id=[],
|
||||||
|
$id_agent_module=false,
|
||||||
|
$id_agente=false
|
||||||
|
) {
|
||||||
|
if ($array_parent_module_id !== false && $id_agent_module !== false && $id_agente !== false) {
|
||||||
|
$parent['parent_module_id'] = $id_agent_module;
|
||||||
|
$module_childs_id = agents_get_modules(
|
||||||
|
$id_agente,
|
||||||
|
'parent_module_id',
|
||||||
|
$parent
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($module_childs_id as $key => $value) {
|
||||||
|
if ($value !== 0) {
|
||||||
|
$array_parent_module_id[] = $key;
|
||||||
|
get_agent_module_childs($array_parent_module_id, $key, $id_agente);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -594,3 +594,26 @@ function network_components_duplicate_network_component($id_local_component)
|
|||||||
|
|
||||||
return network_components_create_network_component($name, $network['type'], $network['id_group'], $network);
|
return network_components_create_network_component($name, $network['type'], $network['id_group'], $network);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all children groups recursive include parent.
|
||||||
|
*
|
||||||
|
* @param integer $id_parent Id of parent.
|
||||||
|
* @param array $groups NO setting, array for recursive.
|
||||||
|
*
|
||||||
|
* @return array $groups All children ids include first parent.
|
||||||
|
*/
|
||||||
|
function network_component_get_groups_recursive($id_parent, $groups=[])
|
||||||
|
{
|
||||||
|
$groups[] = $id_parent;
|
||||||
|
$ids = db_get_all_rows_filter('tnetwork_component_group', ['parent' => $id_parent], 'id_sg');
|
||||||
|
|
||||||
|
if ($ids !== false) {
|
||||||
|
foreach ($ids as $key => $id) {
|
||||||
|
$groups = network_component_get_groups_recursive($id['id_sg'], $groups);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $groups;
|
||||||
|
}
|
||||||
|
@ -12346,29 +12346,29 @@ function reporting_get_stats_modules_status($data, $graph_width=250, $graph_heig
|
|||||||
$tdata = [];
|
$tdata = [];
|
||||||
$tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_CRITICAL, 'title' => __('Monitor critical')], true);
|
$tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_CRITICAL, 'title' => __('Monitor critical')], true);
|
||||||
$tdata[1] = $data['monitor_critical'] <= 0 ? '-' : $data['monitor_critical'];
|
$tdata[1] = $data['monitor_critical'] <= 0 ? '-' : $data['monitor_critical'];
|
||||||
$tdata[1] = '<a style="color: '.COL_CRITICAL.';" class="big_data line_heigth_initial" href="'.$urls['monitor_critical'].'">'.$tdata[1].'</a>';
|
$tdata[1] = '<a style="color: '.COL_CRITICAL.' !important;" class="big_data line_heigth_initial" href="'.$urls['monitor_critical'].'">'.$tdata[1].'</a>';
|
||||||
|
|
||||||
$tdata[2] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_WARNING_DARK, 'title' => __('Monitor warning')], true);
|
$tdata[2] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_WARNING_DARK, 'title' => __('Monitor warning')], true);
|
||||||
$tdata[3] = $data['monitor_warning'] <= 0 ? '-' : $data['monitor_warning'];
|
$tdata[3] = $data['monitor_warning'] <= 0 ? '-' : $data['monitor_warning'];
|
||||||
$tdata[3] = '<a style="color: '.COL_WARNING_DARK.';" class="big_data line_heigth_initial" href="'.$urls['monitor_warning'].'">'.$tdata[3].'</a>';
|
$tdata[3] = '<a style="color: '.COL_WARNING_DARK.' !important;" class="big_data line_heigth_initial" href="'.$urls['monitor_warning'].'">'.$tdata[3].'</a>';
|
||||||
$table_mbs->rowclass[] = '';
|
$table_mbs->rowclass[] = '';
|
||||||
$table_mbs->data[] = $tdata;
|
$table_mbs->data[] = $tdata;
|
||||||
|
|
||||||
$tdata = [];
|
$tdata = [];
|
||||||
$tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_NORMAL, 'title' => __('Monitor normal')], true);
|
$tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_NORMAL, 'title' => __('Monitor normal')], true);
|
||||||
$tdata[1] = $data['monitor_ok'] <= 0 ? '-' : $data['monitor_ok'];
|
$tdata[1] = $data['monitor_ok'] <= 0 ? '-' : $data['monitor_ok'];
|
||||||
$tdata[1] = '<a style="color: '.COL_NORMAL.';" class="big_data" href="'.$urls['monitor_ok'].'">'.$tdata[1].'</a>';
|
$tdata[1] = '<a style="color: '.COL_NORMAL.' !important;" class="big_data" href="'.$urls['monitor_ok'].'">'.$tdata[1].'</a>';
|
||||||
|
|
||||||
$tdata[2] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_UNKNOWN, 'title' => __('Monitor unknown')], true);
|
$tdata[2] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_UNKNOWN, 'title' => __('Monitor unknown')], true);
|
||||||
$tdata[3] = $data['monitor_unknown'] <= 0 ? '-' : $data['monitor_unknown'];
|
$tdata[3] = $data['monitor_unknown'] <= 0 ? '-' : $data['monitor_unknown'];
|
||||||
$tdata[3] = '<a style="color: '.COL_UNKNOWN.';" class="big_data line_heigth_initial" href="'.$urls['monitor_unknown'].'">'.$tdata[3].'</a>';
|
$tdata[3] = '<a style="color: '.COL_UNKNOWN.' !important;" class="big_data line_heigth_initial" href="'.$urls['monitor_unknown'].'">'.$tdata[3].'</a>';
|
||||||
$table_mbs->rowclass[] = '';
|
$table_mbs->rowclass[] = '';
|
||||||
$table_mbs->data[] = $tdata;
|
$table_mbs->data[] = $tdata;
|
||||||
|
|
||||||
$tdata = [];
|
$tdata = [];
|
||||||
$tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_NOTINIT, 'title' => __('Monitor not init')], true);
|
$tdata[0] = html_print_div(['class' => 'main_menu_icon module_background_state', 'style' => 'background-color: '.COL_NOTINIT, 'title' => __('Monitor not init')], true);
|
||||||
$tdata[1] = $data['monitor_not_init'] <= 0 ? '-' : $data['monitor_not_init'];
|
$tdata[1] = $data['monitor_not_init'] <= 0 ? '-' : $data['monitor_not_init'];
|
||||||
$tdata[1] = '<a style="color: '.COL_NOTINIT.';" class="big_data line_heigth_initial" href="'.$urls['monitor_not_init'].'">'.$tdata[1].'</a>';
|
$tdata[1] = '<a style="color: '.COL_NOTINIT.' !important;" class="big_data line_heigth_initial" href="'.$urls['monitor_not_init'].'">'.$tdata[1].'</a>';
|
||||||
|
|
||||||
$tdata[2] = $tdata[3] = '';
|
$tdata[2] = $tdata[3] = '';
|
||||||
$table_mbs->rowclass[] = '';
|
$table_mbs->rowclass[] = '';
|
||||||
@ -14861,7 +14861,13 @@ function reporting_get_stats_servers($filter=[])
|
|||||||
'class' => 'main_menu_icon invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$tdata[1] = '<span class="big_data" id="total_events">'.html_print_image('images/spinner.gif', true).'</span>';
|
$sql_count_event = 'SELECT SQL_NO_CACHE COUNT(id_evento) FROM tevento ';
|
||||||
|
if ($config['event_view_hr']) {
|
||||||
|
$sql_count_event .= 'WHERE utimestamp > (UNIX_TIMESTAMP(NOW()) - '.($config['event_view_hr'] * SECONDS_1HOUR).')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$system_events = db_get_value_sql($sql_count_event);
|
||||||
|
$tdata[1] = '<span class="big_data" id="total_events">'.$system_events.'</span>';
|
||||||
|
|
||||||
if (isset($system_events) && $system_events > 50000 && !enterprise_installed()) {
|
if (isset($system_events) && $system_events > 50000 && !enterprise_installed()) {
|
||||||
$tdata[2] = "<div id='monitoreventsmodal' class='publienterprise left' title='Community version'><img data-title='".__('Enterprise version not installed')."' class='img_help forced_title main_menu_icon' data-use_title_for_force_title='1' src='images/alert-yellow@svg.svg'></div>";
|
$tdata[2] = "<div id='monitoreventsmodal' class='publienterprise left' title='Community version'><img data-title='".__('Enterprise version not installed')."' class='img_help forced_title main_menu_icon' data-use_title_for_force_title='1' src='images/alert-yellow@svg.svg'></div>";
|
||||||
|
@ -1446,13 +1446,22 @@ function ui_format_alert_row(
|
|||||||
|
|
||||||
$actionText .= '</ul></div>';
|
$actionText .= '</ul></div>';
|
||||||
|
|
||||||
if ($actionDefault != '') {
|
if ($actionDefault !== '') {
|
||||||
$actionText .= db_get_sql(
|
$actionDefault_name = db_get_sql(
|
||||||
sprintf(
|
sprintf(
|
||||||
'SELECT name FROM talert_actions WHERE id = %d',
|
'SELECT name FROM talert_actions WHERE id = %d',
|
||||||
$actionDefault
|
$actionDefault
|
||||||
)
|
)
|
||||||
).' <i>('.__('Default').')</i>';
|
);
|
||||||
|
foreach ($actions as $action) {
|
||||||
|
if ($actionDefault_name === $action['name']) {
|
||||||
|
$hide_actionDefault = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($hide_actionDefault !== true) {
|
||||||
|
$actionText .= $actionDefault_name.' <i>('.__('Default').')</i>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
privilege: "",
|
privilege: "",
|
||||||
serialized: false,
|
serialized: false,
|
||||||
serialized_separator: "",
|
serialized_separator: "",
|
||||||
nodes: []
|
nodes: [],
|
||||||
|
id_os: -1,
|
||||||
|
os_agent_version: ""
|
||||||
};
|
};
|
||||||
|
|
||||||
/* public methods */
|
/* public methods */
|
||||||
@ -74,7 +76,9 @@
|
|||||||
nodes:
|
nodes:
|
||||||
typeof config.nodes === "function"
|
typeof config.nodes === "function"
|
||||||
? config.nodes()
|
? config.nodes()
|
||||||
: config.disabled
|
: config.disabled,
|
||||||
|
os_agent: config.os_agent,
|
||||||
|
os_agent_version: config.os_agent_version
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.post(
|
jQuery.post(
|
||||||
@ -319,7 +323,6 @@
|
|||||||
let href = $("a", config.spanPreview).attr("href");
|
let href = $("a", config.spanPreview).attr("href");
|
||||||
let hrefPosition = href.search("group_id=");
|
let hrefPosition = href.search("group_id=");
|
||||||
let hrefNew = href.slice(0, hrefPosition) + "group_id=" + id_group;
|
let hrefNew = href.slice(0, hrefPosition) + "group_id=" + id_group;
|
||||||
|
|
||||||
jQuery.post(
|
jQuery.post(
|
||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
|
@ -110,6 +110,18 @@ function form_controls_massive_operations_agents(metaconsole) {
|
|||||||
$("#id_group").trigger("change");
|
$("#id_group").trigger("change");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var os_agent;
|
||||||
|
$("#os_agent").change(function() {
|
||||||
|
os_agent = this.value;
|
||||||
|
$("#id_group").trigger("change");
|
||||||
|
});
|
||||||
|
|
||||||
|
var os_agent_version;
|
||||||
|
$("#text-os_agent_version").keyup(function() {
|
||||||
|
os_agent_version = this.value;
|
||||||
|
$("#id_group").trigger("change");
|
||||||
|
});
|
||||||
|
|
||||||
if (metaconsole == 1) {
|
if (metaconsole == 1) {
|
||||||
$("#nodes").change(function() {
|
$("#nodes").change(function() {
|
||||||
disabled = $("#disabled").val();
|
disabled = $("#disabled").val();
|
||||||
@ -142,6 +154,13 @@ function form_controls_massive_operations_agents(metaconsole) {
|
|||||||
},
|
},
|
||||||
disabled: function() {
|
disabled: function() {
|
||||||
return disabled;
|
return disabled;
|
||||||
|
},
|
||||||
|
os_agent: function() {
|
||||||
|
return os_agent;
|
||||||
|
},
|
||||||
|
os_agent_version: function() {
|
||||||
|
console.log(os_agent_version);
|
||||||
|
return os_agent_version;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ function configure_modules_form() {
|
|||||||
data["unit"] == "" ? "" : data["unit"]
|
data["unit"] == "" ? "" : data["unit"]
|
||||||
);
|
);
|
||||||
|
|
||||||
$("#checkbox-critical_inverse").prop(
|
$("#checkbox-critical_inverse_string").prop(
|
||||||
"checked",
|
"checked",
|
||||||
data["critical_inverse"]
|
data["critical_inverse"]
|
||||||
);
|
);
|
||||||
|
@ -292,6 +292,10 @@ class AgentModuleWidget extends Widget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$this->values['mAgents'] = $this->getIdCacheAgent($this->values['mAgents']);
|
||||||
|
}
|
||||||
|
|
||||||
$inputs[] = [
|
$inputs[] = [
|
||||||
'class' => 'flex flex-row',
|
'class' => 'flex flex-row',
|
||||||
'id' => 'select_multiple_modules_filtered',
|
'id' => 'select_multiple_modules_filtered',
|
||||||
@ -315,6 +319,65 @@ class AgentModuleWidget extends Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return array with the real id agent and server.
|
||||||
|
*
|
||||||
|
* @param string $id_agents_cache String with the agents cache id.
|
||||||
|
*
|
||||||
|
* @return string $agents_servers with the real id agent and server.
|
||||||
|
*/
|
||||||
|
public function getRealIdAgentNode($id_agents_cache)
|
||||||
|
{
|
||||||
|
$agents_servers = [];
|
||||||
|
$target_agents = explode(',', $id_agents_cache);
|
||||||
|
foreach ($target_agents as $agent_id) {
|
||||||
|
$id_agente = $agent_id;
|
||||||
|
$tmeta_agent = db_get_row_filter(
|
||||||
|
'tmetaconsole_agent',
|
||||||
|
['id_agente' => $id_agente]
|
||||||
|
);
|
||||||
|
|
||||||
|
$id_agente = $tmeta_agent['id_tagente'];
|
||||||
|
$tserver = $tmeta_agent['id_tmetaconsole_setup'];
|
||||||
|
$agents_servers[] = $tserver.'|'.$id_agente;
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode(',', $agents_servers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return string with the cache id agent in metaconsole.
|
||||||
|
*
|
||||||
|
* @param string $id_agents String with the agents and server id.
|
||||||
|
*
|
||||||
|
* @return string $cache_id_agents with the cache id agent.
|
||||||
|
*/
|
||||||
|
public function getIdCacheAgent($id_agents)
|
||||||
|
{
|
||||||
|
$target_agents = explode(',', $id_agents);
|
||||||
|
$cache_id_agents = [];
|
||||||
|
foreach ($target_agents as $agent_id) {
|
||||||
|
if (str_contains($agent_id, '|') === false) {
|
||||||
|
$cache_id_agents[] = $agent_id;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$server_agent = explode('|', $agent_id);
|
||||||
|
$tmeta_agent = db_get_row_filter(
|
||||||
|
'tmetaconsole_agent',
|
||||||
|
[
|
||||||
|
'id_tagente' => $server_agent[1],
|
||||||
|
'id_tmetaconsole_setup' => $server_agent[0],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$cache_id_agents[] = $tmeta_agent['id_agente'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode(',', $cache_id_agents);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Post for widget.
|
* Get Post for widget.
|
||||||
*
|
*
|
||||||
@ -341,6 +404,10 @@ class AgentModuleWidget extends Widget
|
|||||||
$values['mAgents'] = \get_parameter(
|
$values['mAgents'] = \get_parameter(
|
||||||
'filtered-module-agents-'.$this->cellId
|
'filtered-module-agents-'.$this->cellId
|
||||||
);
|
);
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$values['mAgents'] = $this->getRealIdAgentNode($values['mAgents']);
|
||||||
|
}
|
||||||
|
|
||||||
$values['mShowCommonModules'] = \get_parameter(
|
$values['mShowCommonModules'] = \get_parameter(
|
||||||
'filtered-module-show-common-modules-'.$this->cellId
|
'filtered-module-show-common-modules-'.$this->cellId
|
||||||
);
|
);
|
||||||
@ -697,15 +764,24 @@ class AgentModuleWidget extends Widget
|
|||||||
$target_agents = explode(',', $this->values['mAgents']);
|
$target_agents = explode(',', $this->values['mAgents']);
|
||||||
foreach ($target_agents as $agent_id) {
|
foreach ($target_agents as $agent_id) {
|
||||||
try {
|
try {
|
||||||
|
if (is_metaconsole() === true && str_contains($agent_id, '|') === true) {
|
||||||
|
$server_agent = explode('|', $agent_id);
|
||||||
|
} else {
|
||||||
$id_agente = $agent_id;
|
$id_agente = $agent_id;
|
||||||
|
}
|
||||||
|
|
||||||
if ((bool) is_metaconsole() === true) {
|
if ((bool) is_metaconsole() === true) {
|
||||||
|
if (isset($server_agent) === true) {
|
||||||
|
$id_agente = $server_agent[1];
|
||||||
|
$tserver = $server_agent[0];
|
||||||
|
} else {
|
||||||
$tmeta_agent = db_get_row_filter(
|
$tmeta_agent = db_get_row_filter(
|
||||||
'tmetaconsole_agent',
|
'tmetaconsole_agent',
|
||||||
[ 'id_agente' => $id_agente ]
|
[ 'id_agente' => $id_agente ]
|
||||||
);
|
);
|
||||||
|
|
||||||
$id_agente = $tmeta_agent['id_tagente'];
|
$id_agente = $tmeta_agent['id_tagente'];
|
||||||
$tserver = $tmeta_agent['id_tmetaconsole_setup'];
|
$tserver = $tmeta_agent['id_tmetaconsole_setup'];
|
||||||
|
}
|
||||||
|
|
||||||
if (metaconsole_connect(null, $tserver) !== NOERR) {
|
if (metaconsole_connect(null, $tserver) !== NOERR) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -201,6 +201,25 @@ class TopNWidget extends Widget
|
|||||||
$values['period'] = SECONDS_1DAY;
|
$values['period'] = SECONDS_1DAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type graph.
|
||||||
|
$fields = [
|
||||||
|
'bar_vertical' => __('Vertical bars'),
|
||||||
|
'bar_horizontal' => __('Horizontal bars'),
|
||||||
|
'pie' => __('Pie'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => __('Type of graph'),
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $fields,
|
||||||
|
'name' => 'type_graph',
|
||||||
|
'selected' => $values['type_graph'],
|
||||||
|
'return' => true,
|
||||||
|
'sort' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
// Agent.
|
// Agent.
|
||||||
$inputs[] = [
|
$inputs[] = [
|
||||||
'label' => __('Agent').ui_print_help_tip(
|
'label' => __('Agent').ui_print_help_tip(
|
||||||
@ -294,6 +313,25 @@ class TopNWidget extends Widget
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Legend.
|
||||||
|
$fields = [
|
||||||
|
'agent_module' => __('Agent & module'),
|
||||||
|
'agent' => __('Agent'),
|
||||||
|
'module' => __('Module'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => __('Legend'),
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $fields,
|
||||||
|
'name' => 'legend',
|
||||||
|
'selected' => $values['legend'],
|
||||||
|
'return' => true,
|
||||||
|
'sort' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
return $inputs;
|
return $inputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,6 +352,8 @@ class TopNWidget extends Widget
|
|||||||
$values['quantity'] = \get_parameter('quantity', 5);
|
$values['quantity'] = \get_parameter('quantity', 5);
|
||||||
$values['order'] = \get_parameter('order', 1);
|
$values['order'] = \get_parameter('order', 1);
|
||||||
$values['display'] = \get_parameter('display', REPORT_TOP_N_AVG);
|
$values['display'] = \get_parameter('display', REPORT_TOP_N_AVG);
|
||||||
|
$values['type_graph'] = \get_parameter('type_graph', 'bar_horizontal');
|
||||||
|
$values['legend'] = \get_parameter('legend', 'agent_module');
|
||||||
|
|
||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
@ -476,13 +516,28 @@ class TopNWidget extends Widget
|
|||||||
|
|
||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
$module['aliasAgent'] = ui_print_truncate_text($module['aliasAgent'], 20, false, true, false);
|
$module['aliasAgent'] = ui_print_truncate_text($module['aliasAgent'], 20, false, true, false);
|
||||||
|
switch ($this->values['legend']) {
|
||||||
|
case 'agent_module':
|
||||||
$item_name = $module['aliasAgent'].' - '.$module['nameModule'];
|
$item_name = $module['aliasAgent'].' - '.$module['nameModule'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'agent':
|
||||||
|
$item_name = $module['aliasAgent'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'module':
|
||||||
|
$item_name = $module['nameModule'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$item_name = $module['aliasAgent'].' - '.$module['nameModule'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$labels[] = io_safe_output($item_name);
|
$labels[] = io_safe_output($item_name);
|
||||||
|
|
||||||
$data_hbar[] = [
|
$data[] = $module[$display];
|
||||||
'x' => $module[$display],
|
|
||||||
'y' => io_safe_output($item_name),
|
|
||||||
];
|
|
||||||
// Calculation of max-min values for show in graph.
|
// Calculation of max-min values for show in graph.
|
||||||
$calc = (ceil((5 * (float) $module[$display]) / 100) + $module[$display]);
|
$calc = (ceil((5 * (float) $module[$display]) / 100) + $module[$display]);
|
||||||
// Set of max-min values for graph.
|
// Set of max-min values for graph.
|
||||||
@ -502,27 +557,65 @@ class TopNWidget extends Widget
|
|||||||
$valueMax += 10;
|
$valueMax += 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
$height = (count($data_hbar) * 25 + 35);
|
$height = (count($data) * 25 + 35);
|
||||||
$output .= '<div class="container-center">';
|
$output .= '<div class="container-center">';
|
||||||
$options = [
|
$options = [
|
||||||
'height' => $height,
|
'height' => $height,
|
||||||
'axis' => 'y',
|
|
||||||
'legend' => ['display' => false],
|
'legend' => ['display' => false],
|
||||||
'scales' => [
|
'labels' => $labels,
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($this->values['type_graph'] !== 'pie') {
|
||||||
|
$options['scales'] = [
|
||||||
'x' => [
|
'x' => [
|
||||||
'grid' => ['display' => false],
|
'grid' => ['display' => false],
|
||||||
],
|
],
|
||||||
'y' => [
|
'y' => [
|
||||||
'grid' => ['display' => false],
|
'grid' => ['display' => false],
|
||||||
],
|
],
|
||||||
],
|
|
||||||
'labels' => $labels,
|
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($this->values['type_graph']) {
|
||||||
|
case 'bar_horizontal':
|
||||||
|
$options['axis'] = 'y';
|
||||||
$output .= vbar_graph(
|
$output .= vbar_graph(
|
||||||
$data_hbar,
|
$data,
|
||||||
$options
|
$options
|
||||||
);
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'pie':
|
||||||
|
$empty = true;
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
if ($value > 0) {
|
||||||
|
$empty = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($empty === true) {
|
||||||
|
$output .= html_print_image(
|
||||||
|
'images/no_data_toshow.png',
|
||||||
|
true,
|
||||||
|
[ 'style' => 'width: 60%;' ]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$output .= pie_graph(
|
||||||
|
$data,
|
||||||
|
$options
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$output .= vbar_graph(
|
||||||
|
$data,
|
||||||
|
$options
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
|
@ -385,6 +385,53 @@ class TopNEventByGroupWidget extends Widget
|
|||||||
$all_group = true;
|
$all_group = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$servers = metaconsole_get_connection_names();
|
||||||
|
$result = [];
|
||||||
|
foreach ($servers as $key => $server) {
|
||||||
|
$connection = metaconsole_get_connection($server);
|
||||||
|
if (metaconsole_connect($connection) != NOERR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($all_group === false) {
|
||||||
|
$sql = sprintf(
|
||||||
|
'SELECT id_agente,
|
||||||
|
COUNT(*) AS count,
|
||||||
|
"'.$connection['id'].'" AS id_server
|
||||||
|
FROM tevento
|
||||||
|
WHERE utimestamp >= %d
|
||||||
|
AND id_grupo IN (%s)
|
||||||
|
GROUP BY id_agente
|
||||||
|
ORDER BY count DESC
|
||||||
|
LIMIT %d',
|
||||||
|
$timestamp,
|
||||||
|
implode(',', $this->values['groupId']),
|
||||||
|
$this->values['amountShow']
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$sql = sprintf(
|
||||||
|
'SELECT id_agente,
|
||||||
|
COUNT(*) AS count,
|
||||||
|
"'.$connection['id'].'" AS id_server
|
||||||
|
FROM tevento
|
||||||
|
WHERE utimestamp >= %d
|
||||||
|
GROUP BY id_agente
|
||||||
|
ORDER BY count DESC
|
||||||
|
LIMIT %d',
|
||||||
|
$timestamp,
|
||||||
|
$this->values['amountShow']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = db_get_all_rows_sql($sql);
|
||||||
|
if ($rows !== false) {
|
||||||
|
$result = array_merge($result, $rows);
|
||||||
|
}
|
||||||
|
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if ($all_group === false) {
|
if ($all_group === false) {
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT id_agente, COUNT(*) AS count
|
'SELECT id_agente, COUNT(*) AS count
|
||||||
@ -412,6 +459,7 @@ class TopNEventByGroupWidget extends Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = db_get_all_rows_sql($sql);
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($result) === true) {
|
if (empty($result) === true) {
|
||||||
$output .= '<div class="container-center">';
|
$output .= '<div class="container-center">';
|
||||||
@ -430,11 +478,13 @@ class TopNEventByGroupWidget extends Widget
|
|||||||
$name = __('System');
|
$name = __('System');
|
||||||
} else {
|
} else {
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
$name = (string) db_get_value(
|
$name = (string) db_get_value_filter(
|
||||||
'alias',
|
'alias',
|
||||||
'tmetaconsole_agent',
|
'tmetaconsole_agent',
|
||||||
'id_tagente',
|
[
|
||||||
(int) $row['id_agente']
|
'id_tagente' => $row['id_agente'],
|
||||||
|
'id_tmetaconsole_setup' => $row['id_server'],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$name = io_safe_output(
|
$name = io_safe_output(
|
||||||
|
@ -383,6 +383,57 @@ class TopNEventByModuleWidget extends Widget
|
|||||||
$all_group = true;
|
$all_group = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$servers = metaconsole_get_connection_names();
|
||||||
|
$result = [];
|
||||||
|
foreach ($servers as $key => $server) {
|
||||||
|
$connection = metaconsole_get_connection($server);
|
||||||
|
if (metaconsole_connect($connection) != NOERR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($all_group === false) {
|
||||||
|
$sql = sprintf(
|
||||||
|
'SELECT id_agente,
|
||||||
|
id_agentmodule,
|
||||||
|
event_type,
|
||||||
|
"'.$server.'" AS name_server,
|
||||||
|
COUNT(*) AS count
|
||||||
|
FROM tevento
|
||||||
|
WHERE utimestamp >= %d
|
||||||
|
AND id_grupo IN (%s)
|
||||||
|
GROUP BY id_agentmodule, event_type
|
||||||
|
ORDER BY count DESC
|
||||||
|
LIMIT %d',
|
||||||
|
$timestamp,
|
||||||
|
implode(',', $this->values['groupId']),
|
||||||
|
$this->values['amountShow']
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$sql = sprintf(
|
||||||
|
'SELECT id_agente,
|
||||||
|
id_agentmodule,
|
||||||
|
event_type,
|
||||||
|
"'.$server.'" AS name_server,
|
||||||
|
COUNT(*) AS count
|
||||||
|
FROM tevento
|
||||||
|
WHERE utimestamp >= %d
|
||||||
|
GROUP BY id_agentmodule, event_type
|
||||||
|
ORDER BY count DESC
|
||||||
|
LIMIT %d',
|
||||||
|
$timestamp,
|
||||||
|
$this->values['amountShow']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = db_get_all_rows_sql($sql);
|
||||||
|
if ($rows !== false) {
|
||||||
|
$result = array_merge($result, $rows);
|
||||||
|
}
|
||||||
|
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if ($all_group === false) {
|
if ($all_group === false) {
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT id_agente,
|
'SELECT id_agente,
|
||||||
@ -416,6 +467,7 @@ class TopNEventByModuleWidget extends Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = db_get_all_rows_sql($sql);
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($result) === true) {
|
if (empty($result) === true) {
|
||||||
$output = '<div class="container-center">';
|
$output = '<div class="container-center">';
|
||||||
@ -433,6 +485,12 @@ class TopNEventByModuleWidget extends Widget
|
|||||||
if ($row['id_agentmodule'] == 0) {
|
if ($row['id_agentmodule'] == 0) {
|
||||||
$name = __('System');
|
$name = __('System');
|
||||||
} else {
|
} else {
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$connection = metaconsole_get_connection($row['name_server']);
|
||||||
|
if (metaconsole_connect($connection) != NOERR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$name_agent = io_safe_output(
|
$name_agent = io_safe_output(
|
||||||
agents_get_alias($row['id_agente'])
|
agents_get_alias($row['id_agente'])
|
||||||
);
|
);
|
||||||
@ -440,6 +498,17 @@ class TopNEventByModuleWidget extends Widget
|
|||||||
$name_module = io_safe_output(
|
$name_module = io_safe_output(
|
||||||
modules_get_agentmodule_name($row['id_agentmodule'])
|
modules_get_agentmodule_name($row['id_agentmodule'])
|
||||||
);
|
);
|
||||||
|
metaconsole_restore_db();
|
||||||
|
} else {
|
||||||
|
$name_agent = io_safe_output(
|
||||||
|
agents_get_alias($row['id_agente'])
|
||||||
|
);
|
||||||
|
|
||||||
|
$name_module = io_safe_output(
|
||||||
|
modules_get_agentmodule_name($row['id_agentmodule'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($size['width'] < 400) {
|
if ($size['width'] < 400) {
|
||||||
$name_agent = ui_print_truncate_text(
|
$name_agent = ui_print_truncate_text(
|
||||||
$name_agent,
|
$name_agent,
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
<div style='padding-bottom: 50px'>
|
<div style='padding-bottom: 50px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.772';
|
$version = '7.0NG.772';
|
||||||
$build = '230630';
|
$build = '230703';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
|
@ -1708,7 +1708,7 @@ if (empty($result) === false) {
|
|||||||
|
|
||||||
// TODO: Calculate hash access before to use it more simply like other sections. I.E. Events view
|
// TODO: Calculate hash access before to use it more simply like other sections. I.E. Events view
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
echo "<form id='agent-redirection-".$inc_id."' method='POST' action='".$row['server_url']."index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$row['id_agent']."'>";
|
echo "<form id='agent-redirection-".$inc_id."' method='POST' action='".$row['server_url'].'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row['id_agent']."'>";
|
||||||
html_print_input_hidden(
|
html_print_input_hidden(
|
||||||
'loginhash',
|
'loginhash',
|
||||||
'auto',
|
'auto',
|
||||||
|
@ -67,6 +67,7 @@ if (is_ajax()) {
|
|||||||
$agents_inserted = get_parameter('agents_inserted', []);
|
$agents_inserted = get_parameter('agents_inserted', []);
|
||||||
$id_group = (int) get_parameter('id_group');
|
$id_group = (int) get_parameter('id_group');
|
||||||
$pendingdelete = (bool) get_parameter('pendingdelete');
|
$pendingdelete = (bool) get_parameter('pendingdelete');
|
||||||
|
$get_node_agent = (bool) get_parameter('get_node_agent', false);
|
||||||
|
|
||||||
$refresh_contact = get_parameter('refresh_contact', 0);
|
$refresh_contact = get_parameter('refresh_contact', 0);
|
||||||
|
|
||||||
@ -1309,6 +1310,18 @@ if (is_ajax()) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($get_node_agent === true) {
|
||||||
|
$id = get_parameter('id', 0);
|
||||||
|
if (empty($id) === false) {
|
||||||
|
$result = db_get_value_sql(
|
||||||
|
'SELECT id_tmetaconsole_setup FROM tmetaconsole_agent WHERE id_agente = '.$id
|
||||||
|
);
|
||||||
|
|
||||||
|
echo json_encode($result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,21 +203,27 @@ try {
|
|||||||
|
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
case 'module_status':
|
case 'module_status':
|
||||||
echo csv_format_delimiter(events_translate_module_status(
|
echo csv_format_delimiter(
|
||||||
|
events_translate_module_status(
|
||||||
$row[$key]
|
$row[$key]
|
||||||
));
|
)
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'event_type':
|
case 'event_type':
|
||||||
echo csv_format_delimiter(events_translate_event_type(
|
echo csv_format_delimiter(
|
||||||
|
events_translate_event_type(
|
||||||
$row[$key]
|
$row[$key]
|
||||||
));
|
)
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'criticity':
|
case 'criticity':
|
||||||
echo csv_format_delimiter(events_translate_event_criticity(
|
echo csv_format_delimiter(
|
||||||
|
events_translate_event_criticity(
|
||||||
$row[$key]
|
$row[$key]
|
||||||
));
|
)
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'custom_data':
|
case 'custom_data':
|
||||||
|
@ -628,6 +628,27 @@ if ($favorite_menu !== false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Links.
|
||||||
|
$rows = db_get_all_rows_in_table('tlink', 'name');
|
||||||
|
// $rows = [];
|
||||||
|
if (!empty($rows)) {
|
||||||
|
$menu_operation['links']['text'] = __('Links');
|
||||||
|
$menu_operation['links']['sec2'] = '';
|
||||||
|
$menu_operation['links']['id'] = 'god-links';
|
||||||
|
|
||||||
|
$sub = [];
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
// Audit //meter en extensiones.
|
||||||
|
$sub[$row['link']]['text'] = $row['name'];
|
||||||
|
$sub[$row['link']]['id'] = $row['name'];
|
||||||
|
$sub[$row['link']]['type'] = 'direct';
|
||||||
|
$sub[$row['link']]['subtype'] = 'new_blank';
|
||||||
|
}
|
||||||
|
|
||||||
|
$menu_operation['links']['sub'] = $sub;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Links.
|
// Links.
|
||||||
$rows = db_get_all_rows_in_table('tlink', 'name');
|
$rows = db_get_all_rows_in_table('tlink', 'name');
|
||||||
@ -804,6 +825,8 @@ if ($access_console_node === true) {
|
|||||||
// ~ }
|
// ~ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Save operation menu array to use in operation/extensions.php view
|
// Save operation menu array to use in operation/extensions.php view
|
||||||
$operation_menu_array = $menu_operation;
|
$operation_menu_array = $menu_operation;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.772
|
||||||
%define release 230630
|
%define release 230703
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.772
|
||||||
%define release 230630
|
%define release 230703
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.772
|
||||||
%define release 230630
|
%define release 230703
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -2094,7 +2094,7 @@ class Client
|
|||||||
sprintf(
|
sprintf(
|
||||||
'UPDATE `tconfig` SET `value` = \'%s\'
|
'UPDATE `tconfig` SET `value` = \'%s\'
|
||||||
WHERE `token` = "progress_update"',
|
WHERE `token` = "progress_update"',
|
||||||
$updates
|
mysqli_real_escape_string($this->dbh, $updates)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.772-230630
|
Version: 7.0NG.772-230703
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.772-230630"
|
pandora_version="7.0NG.772-230703"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.772";
|
my $pandora_version = "7.0NG.772";
|
||||||
my $pandora_build = "230630";
|
my $pandora_build = "230703";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.772";
|
my $pandora_version = "7.0NG.772";
|
||||||
my $pandora_build = "230630";
|
my $pandora_build = "230703";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -776,7 +776,14 @@ sub pandora_sendmail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($pa_config->{"mta_user"} ne ""){
|
if ($pa_config->{"mta_user"} ne ""){
|
||||||
$mail{auth} = {user=>$pa_config->{"mta_user"}, password=>$pa_config->{"mta_pass"}, method=>$pa_config->{"mta_auth"}, required=>1 };
|
$mail{auth} = {
|
||||||
|
user=>$pa_config->{"mta_user"},
|
||||||
|
password=>PandoraFMS::Core::pandora_output_password(
|
||||||
|
$pa_config,
|
||||||
|
safe_output($pa_config->{"mta_pass"})
|
||||||
|
),
|
||||||
|
method=>$pa_config->{"mta_auth"}, required=>1
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.772
|
||||||
%define release 230630
|
%define release 230703
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.772
|
%define version 7.0NG.772
|
||||||
%define release 230630
|
%define release 230703
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.772"
|
PI_VERSION="7.0NG.772"
|
||||||
PI_BUILD="230630"
|
PI_BUILD="230703"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.772 Build 230630";
|
my $version = "7.0NG.772 Build 230703";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.772 Build 230630";
|
my $version = "7.0NG.772 Build 230703";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user