diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index d93b2be5b9..530d72c92a 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.739-191007
+Version: 7.0NG.739-191008
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 44ea53b266..7a0b937277 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.739-191007"
+pandora_version="7.0NG.739-191008"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 632d48a5b3..3c1555127b 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.739';
-use constant AGENT_BUILD => '191007';
+use constant AGENT_BUILD => '191008';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 078bf06e88..cfb80e4a20 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.739
-%define release 191007
+%define release 191008
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 7b6c11ed99..75849e3332 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.739
-%define release 191007
+%define release 191008
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 01c278b2be..c9c15b524d 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.739"
-PI_BUILD="191007"
+PI_BUILD="191008"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 1e4a49c3f0..c4cb54ef67 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{191007}
+{191008}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 56488961dd..4c2e13743e 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.739(Build 191007)")
+#define PANDORA_VERSION ("7.0NG.739(Build 191008)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 9ff0b5bc25..421dfa8cb0 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.739(Build 191007))"
+ VALUE "ProductVersion", "(7.0NG.739(Build 191008))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 743602bee7..dbc8eb0477 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.739-191007
+Version: 7.0NG.739-191008
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index b45c35a9db..6b176913da 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.739-191007"
+pandora_version="7.0NG.739-191008"
package_pear=0
package_pandora=1
diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php
index ac110b0d6f..5a4653fc29 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_common.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_common.php
@@ -1191,49 +1191,54 @@ $table_relations->data[-1][3] .= html_print_image('images/lock.png', true).'
$table_relations->data[-1][4] = '';
$table_relations->data[-1][4] .= html_print_image('images/cross.png', true).'';
-$module_relations = modules_get_relations(['id_module' => $id_agent_module]);
-if (!$module_relations) {
- $module_relations = [];
-}
$relations_count = 0;
-foreach ($module_relations as $key => $module_relation) {
- if ($module_relation['module_a'] == $id_agent_module) {
- $module_id = $module_relation['module_b'];
- $agent_id = modules_give_agent_id_from_module_id(
- $module_relation['module_b']
- );
- } else {
- $module_id = $module_relation['module_a'];
- $agent_id = modules_give_agent_id_from_module_id(
- $module_relation['module_a']
- );
+if ($id_agent_module) {
+ $module_relations = modules_get_relations(['id_module' => $id_agent_module]);
+
+ if (!$module_relations) {
+ $module_relations = [];
}
- $agent_name = ui_print_agent_name($agent_id, true);
+ $relations_count = 0;
+ foreach ($module_relations as $key => $module_relation) {
+ if ($module_relation['module_a'] == $id_agent_module) {
+ $module_id = $module_relation['module_b'];
+ $agent_id = modules_give_agent_id_from_module_id(
+ $module_relation['module_b']
+ );
+ } else {
+ $module_id = $module_relation['module_a'];
+ $agent_id = modules_give_agent_id_from_module_id(
+ $module_relation['module_a']
+ );
+ }
- $module_name = modules_get_agentmodule_name($module_id);
- if (empty($module_name) || $module_name == 'false') {
- $module_name = $module_id;
+ $agent_name = ui_print_agent_name($agent_id, true);
+
+ $module_name = modules_get_agentmodule_name($module_id);
+ if (empty($module_name) || $module_name == 'false') {
+ $module_name = $module_id;
+ }
+
+ if ($module_relation['disable_update']) {
+ $disabled_update_class = '';
+ } else {
+ $disabled_update_class = 'alpha50';
+ }
+
+ // Agent name.
+ $table_relations->data[$relations_count][0] = $agent_name;
+ // Module name.
+ $table_relations->data[$relations_count][1] = "".ui_print_truncate_text($module_name, 'module_medium', true, true, true, '[…]').'';
+ // Type.
+ $table_relations->data[$relations_count][2] = ($module_relation['type'] === 'direct') ? __('Direct') : __('Failover');
+ // Lock relationship updates.
+ $table_relations->data[$relations_count][3] = ''.html_print_image('images/lock.png', true).'';
+ // Delete relationship.
+ $table_relations->data[$relations_count][4] = ''.html_print_image('images/cross.png', true).'';
+ $relations_count++;
}
-
- if ($module_relation['disable_update']) {
- $disabled_update_class = '';
- } else {
- $disabled_update_class = 'alpha50';
- }
-
- // Agent name.
- $table_relations->data[$relations_count][0] = $agent_name;
- // Module name.
- $table_relations->data[$relations_count][1] = "".ui_print_truncate_text($module_name, 'module_medium', true, true, true, '[…]').'';
- // Type.
- $table_relations->data[$relations_count][2] = ($module_relation['type'] === 'direct') ? __('Direct') : __('Failover');
- // Lock relationship updates.
- $table_relations->data[$relations_count][3] = ''.html_print_image('images/lock.png', true).'';
- // Delete relationship.
- $table_relations->data[$relations_count][4] = ''.html_print_image('images/cross.png', true).'';
- $relations_count++;
}
html_print_input_hidden('module_relations_count', $relations_count);
diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php
index 7a16e47a1a..013a7e967f 100644
--- a/pandora_console/include/class/ConsoleSupervisor.php
+++ b/pandora_console/include/class/ConsoleSupervisor.php
@@ -209,6 +209,12 @@ class ConsoleSupervisor
$this->getUMMessages();
+ /*
+ * Check if the Server and Console has
+ * the same versions.
+ */
+ $this->checkConsoleServerVersions();
+
}
@@ -435,6 +441,12 @@ class ConsoleSupervisor
$this->getUMMessages();
+ /*
+ * Check if the Server and Console has
+ * the same versions.
+ */
+ $this->checkConsoleServerVersions();
+
}
@@ -2334,4 +2346,35 @@ class ConsoleSupervisor
}
+ /**
+ * Check if all servers and console versions are the same
+ *
+ * @return void
+ */
+ public function checkConsoleServerVersions()
+ {
+ global $config;
+ // List all servers except satellite server
+ $server_version_list = db_get_all_rows_sql(
+ 'SELECT name, version FROM tserver WHERE server_type != '.SERVER_TYPE_ENTERPRISE_SATELLITE
+ );
+
+ foreach ($server_version_list as $server) {
+ if (strpos($server['version'], $config['current_package_enterprise']) === false) {
+ $title_ver_misaligned = $server['name'].' version misaligned with Console';
+ $message_ver_misaligned = 'Server '.$server['name'].' and this console have different versions. This might cause several malfunctions. Please, update this server.';
+
+ $this->notify(
+ [
+ 'type' => 'NOTIF.SERVER.MISALIGNED',
+ 'title' => __($title_ver_misaligned),
+ 'message' => __($message_ver_misaligned),
+ 'url' => ui_get_full_url('index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online'),
+ ]
+ );
+ }
+ }
+ }
+
+
}
diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php
index 251fde0d73..8e70fb4389 100644
--- a/pandora_console/include/class/TreeService.class.php
+++ b/pandora_console/include/class/TreeService.class.php
@@ -104,7 +104,7 @@ class TreeService extends Tree
break;
case SERVICE_STATUS_WARNING:
- $processed_items[$row['id']][$key]['statusImageHTML'] = '';
+ $processed_items[$row['id']]['statusImageHTML'] = '
';
break;
case SERVICE_STATUS_UNKNOWN:
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 6556d2aa12..4f3ff4ba1b 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC191007';
+$build_version = 'PC191008';
$pandora_version = 'v7.0NG.739';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index c3a25238f4..ccbe7f6dd2 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -4382,7 +4382,7 @@ function events_page_general($event)
$data = [];
$data[0] = __('Event name');
- $data[1] = events_display_name($event['evento']);
+ $data[1] = ''.events_display_name($event['evento']).'';
$table_general->data[] = $data;
$data = [];
diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index e44b93a97b..4ad8294ae1 100644
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -295,20 +295,40 @@ function grafico_modulo_sparse_data(
return false;
}
- $array_data['sum'.$series_suffix]['agent_module_id'] = $agent_module_id;
- $array_data['sum'.$series_suffix]['id_module_type'] = $data_module_graph['id_module_type'];
- $array_data['sum'.$series_suffix]['agent_name'] = $data_module_graph['agent_name'];
- $array_data['sum'.$series_suffix]['module_name'] = $data_module_graph['module_name'];
- $array_data['sum'.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias'];
- $array_data['sum'.$series_suffix]['unit'] = $data_module_graph['unit'];
+ $array_data = series_suffix_leyend(
+ 'sum',
+ $series_suffix,
+ $agent_module_id,
+ $data_module_graph,
+ $array_data
+ );
if ($params['percentil']) {
- $array_data['percentil'.$series_suffix]['agent_module_id'] = $agent_module_id;
- $array_data['percentil'.$series_suffix]['id_module_type'] = $data_module_graph['id_module_type'];
- $array_data['percentil'.$series_suffix]['agent_name'] = $data_module_graph['agent_name'];
- $array_data['percentil'.$series_suffix]['module_name'] = $data_module_graph['module_name'];
- $array_data['percentil'.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias'];
- $array_data['percentil'.$series_suffix]['unit'] = $data_module_graph['unit'];
+ $array_data = series_suffix_leyend(
+ 'percentil',
+ $series_suffix,
+ $agent_module_id,
+ $data_module_graph,
+ $array_data
+ );
+ }
+
+ if ($params['type_mode_graph']) {
+ $array_data = series_suffix_leyend(
+ 'min',
+ $series_suffix,
+ $agent_module_id,
+ $data_module_graph,
+ $array_data
+ );
+
+ $array_data = series_suffix_leyend(
+ 'max',
+ $series_suffix,
+ $agent_module_id,
+ $data_module_graph,
+ $array_data
+ );
}
// This is for a specific type of report that consists in passing
@@ -3169,6 +3189,21 @@ function graphic_incident_source($width=320, $height=200)
}
+function series_suffix_leyend($series_name, $series_suffix, $id_agent, $data_module_graph, $array_data)
+{
+ global $config;
+
+ $array_data[$series_name.$series_suffix]['agent_module_id'] = $id_agent;
+ $array_data[$series_name.$series_suffix]['id_module_type'] = $data_module_graph['id_module_type'];
+ $array_data[$series_name.$series_suffix]['agent_name'] = $data_module_graph['agent_name'];
+ $array_data[$series_name.$series_suffix]['module_name'] = $data_module_graph['module_name'];
+ $array_data[$series_name.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias'];
+ $array_data[$series_name.$series_suffix]['unit'] = $data_module_graph['unit'];
+
+ return $array_data;
+}
+
+
function graph_events_validated($width=300, $height=200, $extra_filters=[], $meta=false, $history=false)
{
global $config;
diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php
index fbee2a5331..39cc5b4a49 100755
--- a/pandora_console/include/functions_modules.php
+++ b/pandora_console/include/functions_modules.php
@@ -2654,21 +2654,18 @@ function modules_get_relations($params=[])
}
$modules_type = '';
+ $modules_type_filter = '';
if (isset($params['modules_type'])) {
- $modules_type = $params['modules_type'];
+ $module_type = 'INNER JOIN ttipo_modulo ttm ON tam.id_tipo_modulo = ttm.id_tipo';
+ $modules_type_filter = sprintf(
+ "AND ttm.nombre = '%s'",
+ $params['modules_type']
+ );
}
- $sql = 'SELECT DISTINCT tmr.id, tmr.module_a, tmr.module_b,
- tmr.disable_update, tmr.type
- FROM tmodule_relationship tmr,
- tagente_modulo tam,
- tagente ta,
- ttipo_modulo ttm
- WHERE ';
-
- $agent_filter = '';
- if ($id_agent > 0) {
- $agent_filter = sprintf('AND ta.id_agente = %d', $id_agent);
+ $distinct = '';
+ if (empty($params)) {
+ $distinct = 'DISTINCT';
}
$module_a_filter = '';
@@ -2678,6 +2675,11 @@ function modules_get_relations($params=[])
$module_b_filter = sprintf('AND tmr.module_b = %d', $id_module);
}
+ $agent_filter = '';
+ if ($id_agent > 0) {
+ $agent_filter = sprintf('AND ta.id_agente = %d', $id_agent);
+ }
+
$disabled_update_filter = '';
if ($disabled_update >= 0) {
$disabled_update_filter = sprintf(
@@ -2686,22 +2688,25 @@ function modules_get_relations($params=[])
);
}
- $modules_type_filter = '';
- if ($modules_type != '') {
- $modules_type_filter = sprintf(
- "AND (tam.id_tipo_modulo = ttm.id_tipo AND ttm.nombre = '%s')",
- $modules_type
- );
- }
-
- $sql .= "( (tmr.module_a = tam.id_agente_modulo
- $module_a_filter)
- OR (tmr.module_b = tam.id_agente_modulo
- $module_b_filter) )
- AND tam.id_agente = ta.id_agente
- $agent_filter
- $disabled_update_filter
- $modules_type_filter";
+ $sql = sprintf(
+ 'SELECT %s tmr.id, tmr.module_a, tmr.module_b,
+ tmr.disable_update, tmr.type
+ FROM tmodule_relationship tmr
+ INNER JOIN tagente_modulo tam
+ ON (tmr.module_a = tam.id_agente_modulo %s)
+ OR (tmr.module_b = tam.id_agente_modulo %s)
+ INNER JOIN tagente ta
+ ON tam.id_agente = ta.id_agente
+ %s
+ WHERE 1=1 %s %s %s',
+ $distinct,
+ $module_a_filter,
+ $module_b_filter,
+ $module_type,
+ $agent_filter,
+ $disabled_update_filter,
+ $modules_type_filter
+ );
return db_get_all_rows_sql($sql);
}
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 06c4b579ea..6c0db1db8f 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -162,6 +162,10 @@ function ui_print_truncate_text($text, $numChars=GENERIC_SIZE_TEXT, $showTextInA
}
if ($showTextInAToopTip) {
+ if (is_string($showTextInAToopTip)) {
+ $text = ui_print_truncate_text($showTextInAToopTip, ($numChars * 2), false, true, false);
+ }
+
$truncateText = $truncateText.ui_print_help_tip(htmlspecialchars($text), true);
} else {
if ($style !== false) {
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 088e125c09..b6537ed570 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@