diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf
index 0ff67a62d3..30fb45624c 100644
--- a/pandora_agents/pc/AIX/pandora_agent.conf
+++ b/pandora_agents/pc/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, AIX version
+# Version 7.0NG.736, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf
index c7c6fdd493..fc704fb87b 100644
--- a/pandora_agents/pc/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, FreeBSD Version
+# Version 7.0NG.736, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf
index 1a349583dc..46789e8bea 100644
--- a/pandora_agents/pc/HP-UX/pandora_agent.conf
+++ b/pandora_agents/pc/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, HP-UX Version
+# Version 7.0NG.736, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf
index dc172b7e2f..ce69b462a5 100644
--- a/pandora_agents/pc/Linux/pandora_agent.conf
+++ b/pandora_agents/pc/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, GNU/Linux
+# Version 7.0NG.736, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf
index 3d76832397..904015a997 100644
--- a/pandora_agents/pc/NT4/pandora_agent.conf
+++ b/pandora_agents/pc/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, GNU/Linux
+# Version 7.0NG.736, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf
index 9b088eae51..d2d0661065 100644
--- a/pandora_agents/pc/SunOS/pandora_agent.conf
+++ b/pandora_agents/pc/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, Solaris Version
+# Version 7.0NG.736, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf
index e2c442a520..d0593ebcc9 100644
--- a/pandora_agents/pc/Win32/pandora_agent.conf
+++ b/pandora_agents/pc/Win32/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
-# Version 7.0NG.735
+# Version 7.0NG.736
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf
index fea0cb56db..74c397dc94 100644
--- a/pandora_agents/shellscript/aix/pandora_agent.conf
+++ b/pandora_agents/shellscript/aix/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.735, AIX version
+# Version 7.0NG.736, AIX version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
index f0ce5b2519..b7a30f962e 100644
--- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
+++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.735
+# Version 7.0NG.736
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena
diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
index 20cdfeff99..9114cd7348 100644
--- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf
+++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.735, HPUX Version
+# Version 7.0NG.736, HPUX Version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf
index e8ba9653ce..8eb9c0bbc8 100644
--- a/pandora_agents/shellscript/linux/pandora_agent.conf
+++ b/pandora_agents/shellscript/linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735
+# Version 7.0NG.736
# Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
index 29d13ff75c..24d44d51fc 100644
--- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf
+++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735
+# Version 7.0NG.736
# Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf
index 8ef8a6fdc1..a940b58a89 100644
--- a/pandora_agents/shellscript/openWRT/pandora_agent.conf
+++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735
+# Version 7.0NG.736
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf
index 1ace947818..13611f36c0 100644
--- a/pandora_agents/shellscript/solaris/pandora_agent.conf
+++ b/pandora_agents/shellscript/solaris/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.735, Solaris version
+# Version 7.0NG.736, Solaris version
# General Parameters
# ==================
diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index c67f64d16c..6a826afd8b 100644
--- a/pandora_agents/unix/AIX/pandora_agent.conf
+++ b/pandora_agents/unix/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, AIX version
+# Version 7.0NG.736, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 4ead22711f..b6e8eee877 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.735-190614
+Version: 7.0NG.736-190628
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 0a62096fb5..5b33962912 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.735-190614"
+pandora_version="7.0NG.736-190628"
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/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf
index d7ee481255..35a24de477 100644
--- a/pandora_agents/unix/Darwin/pandora_agent.conf
+++ b/pandora_agents/unix/Darwin/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, GNU/Linux
+# Version 7.0NG.736, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf
index b02b379470..fba8f9fa24 100644
--- a/pandora_agents/unix/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, FreeBSD Version
+# Version 7.0NG.736, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf
index 57e35c0a03..36164100be 100644
--- a/pandora_agents/unix/HP-UX/pandora_agent.conf
+++ b/pandora_agents/unix/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, HP-UX Version
+# Version 7.0NG.736, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf
index db07876f12..6012f59705 100644
--- a/pandora_agents/unix/Linux/pandora_agent.conf
+++ b/pandora_agents/unix/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, GNU/Linux
+# Version 7.0NG.736, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf
index 8cda0f8fe0..300c03a3f5 100644
--- a/pandora_agents/unix/NT4/pandora_agent.conf
+++ b/pandora_agents/unix/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, GNU/Linux
+# Version 7.0NG.736, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf
index 629fe6a6fb..e899eed824 100644
--- a/pandora_agents/unix/NetBSD/pandora_agent.conf
+++ b/pandora_agents/unix/NetBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, NetBSD Version
+# Version 7.0NG.736, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf
index 8ff3c52de5..be7904794d 100644
--- a/pandora_agents/unix/SunOS/pandora_agent.conf
+++ b/pandora_agents/unix/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.735, Solaris Version
+# Version 7.0NG.736, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 23dc9f3f4c..e547e26c9d 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
-use constant AGENT_VERSION => '7.0NG.735';
-use constant AGENT_BUILD => '190614';
+use constant AGENT_VERSION => '7.0NG.736';
+use constant AGENT_BUILD => '190628';
# 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 fcc42de22c..dae9afb803 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.735
-%define release 190614
+%define version 7.0NG.736
+%define release 190628
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 14d90f0833..d195943bad 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.735
-%define release 190614
+%define version 7.0NG.736
+%define release 190628
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 cf65cbba4a..8df338265a 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
-PI_VERSION="7.0NG.735"
-PI_BUILD="190614"
+PI_VERSION="7.0NG.736"
+PI_BUILD="190628"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf
index 518cd3df0e..9c2fe6d01d 100644
--- a/pandora_agents/win32/bin/pandora_agent.conf
+++ b/pandora_agents/win32/bin/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas
-# Version 7.0NG.735
+# Version 7.0NG.736
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index eaa9573fe6..12e927b377 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
-{Pandora FMS Windows Agent v7.0NG.735}
+{Pandora FMS Windows Agent v7.0NG.736}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{190614}
+{190628}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 8724546822..df44b628ce 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.735(Build 190614)")
+#define PANDORA_VERSION ("7.0NG.736(Build 190628)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 67a1d6e71d..6e5b9873bf 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.735(Build 190614))"
+ VALUE "ProductVersion", "(7.0NG.736(Build 190628))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index c653917fdc..ccfbbb3ace 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.735-190614
+Version: 7.0NG.736-190628
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 1f20583f54..270ec1354b 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.735-190614"
+pandora_version="7.0NG.736-190628"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php
index b5860068d8..97657f5189 100644
--- a/pandora_console/extensions/agents_modules.php
+++ b/pandora_console/extensions/agents_modules.php
@@ -1,23 +1,24 @@
'.__('Group').'';
$filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;');
$filter_recursion_label = ''.__('Recursion').'';
$filter_recursion = html_print_checkbox('recursion', 1, 0, true);
- // groups module
+ // Groups module.
$filter_module_groups_label = ''.__('Module group').'';
$filter_module_groups = html_print_select_from_sql(
'SELECT * FROM tmodule_group ORDER BY name',
@@ -146,7 +147,7 @@ function mainAgentsModules()
'width: auto;'
);
- // agent
+ // Agent.
$agents = agents_get_group_agents($group_id);
if ((empty($agents)) || $agents == -1) {
$agents = [];
@@ -155,7 +156,7 @@ function mainAgentsModules()
$filter_agents_label = ''.__('Agents').'';
$filter_agents = html_print_select($agents, 'id_agents2[]', $agents_id, '', '', 0, true, true, true, '', false, 'min-width: 180px; max-width: 200px;');
- // type show
+ // Type show.
$selection = [
0 => __('Show common modules'),
1 => __('Show all modules'),
@@ -163,12 +164,12 @@ function mainAgentsModules()
$filter_type_show_label = ''.__('Show common modules').'';
$filter_type_show = html_print_select($selection, 'selection_agent_module', $selection_a_m, '', '', 0, true, false, true, '', false, 'min-width: 180px;');
- // modules
+ // Modules.
$all_modules = select_modules_for_agent_group($group_id, $agents_id, $selection_a_m, false);
$filter_modules_label = ''.__('Module').'';
$filter_modules = html_print_select($all_modules, 'module[]', $modules_selected, '', '', 0, true, true, false, '', false, 'min-width: 180px; max-width: 200px;');
- // update
+ // Update.
$filter_update = html_print_submit_button(__('Update item'), 'edit_item', false, 'class="sub upd"', true);
$onheader = [
@@ -178,8 +179,11 @@ function mainAgentsModules()
'combo_groups' => $filter_groups,
];
- // Old style table, we need a lot of special formatting,don't use table function
- // Prepare old-style table
+ /*
+ * Old style table, we need a lot of special formatting,don't use table function.
+ * Prepare old-style table.
+ */
+
if ($config['pure'] == 0) {
// Header.
ui_print_page_header(
@@ -200,38 +204,51 @@ function mainAgentsModules()
$full_modules = urlencode(implode(';', $full_modules_selected));
$full_agents = urlencode(implode(';', $full_agents_id));
- $url = " index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset
+ $url = 'index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset
&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr&full_modules_selected=$full_modules
- &full_agents_id=$full_agents&selection_agent_module=$selection_a_m";
+ &full_agents_id=$full_agents&selection_agent_module=$selection_a_m';
} else {
- $url = " index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr";
+ $url = 'index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr';
}
- // Floating menu - Start
+ // Floating menu - Start.
echo '
';
echo '';
echo '
';
- // Floating menu - End
+ // Floating menu - End.
ui_require_jquery_file('countdown');
}
if ($config['pure'] != 1) {
- echo '';
+ $show_filters = '';
+ ui_toggle($show_filters, __('Filters'));
}
if ($agents_id[0] != -1) {
@@ -291,7 +308,7 @@ function mainAgentsModules()
$count = 0;
foreach ($agents as $agent) {
- // TODO TAGS agents_get_modules
+ // TODO TAGS agents_get_modules.
$module = agents_get_modules(
$agent,
false,
@@ -339,7 +356,7 @@ function mainAgentsModules()
}
}
} else {
- // TODO TAGS agents_get_modules
+ // TODO TAGS agents_get_modules.
$all_modules = agents_get_modules(
$agents,
false,
@@ -414,11 +431,11 @@ function mainAgentsModules()
if ($hor_offset > 0) {
$new_hor_offset = ($hor_offset - $block);
- echo ""."".html_print_image(
- 'images/arrow_left.png',
+ echo " | ".html_print_image(
+ 'images/arrow_left_green.png',
true,
['title' => __('Previous modules')]
- ).''.' | ';
+ ).'';
}
$nmodules = 0;
@@ -440,11 +457,11 @@ function mainAgentsModules()
if (($hor_offset + $block) < $nmodules) {
$new_hor_offset = ($hor_offset + $block);
- echo ""."".html_print_image(
- 'images/arrow.png',
+ echo " | ".html_print_image(
+ 'images/arrow_right_green.png',
true,
['title' => __('More modules')]
- ).''.' | ';
+ ).'';
}
echo '';
@@ -457,12 +474,12 @@ function mainAgentsModules()
$filter_agents['id_grupo'] = $group_id;
}
- // Prepare pagination
- $url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&'.'hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m;
+ // Prepare pagination.
+ $url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m;
ui_pagination($total_pagination, $url);
foreach ($agents as $agent) {
- // Get stats for this group
+ // Get stats for this group.
$agent_status = agents_get_status($agent['id_agente']);
$alias = db_get_row('tagente', 'id_agente', $agent['id_agente']);
if (empty($alias['alias'])) {
@@ -471,29 +488,29 @@ function mainAgentsModules()
switch ($agent_status) {
case 4:
- // Alert fired status
+ // Alert fired status.
$rowcolor = 'group_view_alrm';
break;
case 1:
- // Critical status
+ // Critical status.
$rowcolor = 'group_view_crit';
break;
case 2:
- // Warning status
+ // Warning status.
$rowcolor = 'group_view_warn';
break;
case 0:
- // Normal status
+ // Normal status.
$rowcolor = 'group_view_ok';
break;
case 3:
case -1:
default:
- // Unknown status
+ // Unknown status.
$rowcolor = 'group_view_unk';
break;
}
@@ -502,7 +519,7 @@ function mainAgentsModules()
echo "
".$alias['alias'].' | ';
- // TODO TAGS agents_get_modules
+ // TODO TAGS agents_get_modules.
$agent_modules = agents_get_modules($agent['id_agente'], false, $filter_module_group, true, true);
$nmodules = 0;
@@ -572,18 +589,23 @@ function mainAgentsModules()
echo '';
- echo "";
+ $show_legend = "
";
+ $show_legend .= "
+
".__('Orange cell when the module has fired alerts').'
';
+ $show_legend .= "
+
".__('Red cell when the module has a critical status').'
+
';
+ $show_legend .= "
+
".__('Yellow cell when the module has a warning status').'
';
+ $show_legend .= "
+
".__('Green cell when the module has a normal status').'
';
+ $show_legend .= "
+
".__('Grey cell when the module has an unknown status').'
';
+ $show_legend .= "
+
".__("Cell turns blue when the module is in 'not initialize' status").'
';
+ $show_legend .= '
';
+ ui_toggle($show_legend, __('Legend'));
- echo '
';
- echo "".__('Legend').' |
';
- echo " | ".__('Orange cell when the module has fired alerts').' |
';
- echo " | ".__('Red cell when the module has a critical status').' |
';
- echo " | ".__('Yellow cell when the module has a warning status').' |
';
- echo " | ".__('Green cell when the module has a normal status').' |
';
- echo " | ".__('Grey cell when the module has an unknown status').' |
';
- echo " | ".__("Cell turns blue when the module is in 'not initialize' status").' |
';
- echo '
';
- echo '
';
$pure_var = $config['pure'];
if ($pure_var) {
$pure_var = 1;
@@ -627,16 +649,14 @@ $ignored_params['refresh'] = '';
$.each($('.th_class_module_r'), function (i, elem) {
id = $(elem).attr('id').replace('th_module_r_', '');
$("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px');
-
- //$("#div_module_r_" + id).css('margin-top', (max_width - $("#div_module_r_" + id).width()) + 'px');
$("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px');
$("#div_module_r_" + id).show();
});
- var refr =" . $refr . ";
- var pure =" . $pure_var . ";
- var href ='" . ui_get_url_refresh ($ignored_params) . "';
-
+ var refr = '';
+ var pure = '';
+ var href =' ';
+
if (pure) {
var startCountDown = function (duration, cb) {
$('div.vc-countdown').countdown('destroy');
@@ -646,7 +666,7 @@ $ignored_params['refresh'] = '';
$('div.vc-countdown').countdown({
until: t,
format: 'MS',
- layout: '(%M%nn%M:%S%nn%S Until refresh)',
+ layout: '(%M%nn%M:%S%nn%S ) ',
alwaysExpire: true,
onExpiry: function () {
$('div.vc-countdown').countdown('destroy');
@@ -655,8 +675,11 @@ $ignored_params['refresh'] = '';
}
});
}
-
- startCountDown(refr, false);
+
+ if(refr>0){
+ startCountDown(refr, false);
+ }
+
var controls = document.getElementById('vc-controls');
autoHideElement(controls, 1000);
diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php
index 9e750be932..d9843f9860 100644
--- a/pandora_console/extensions/module_groups.php
+++ b/pandora_console/extensions/module_groups.php
@@ -1,17 +1,32 @@
0, 1, 0)) AS alerts_module_count,
- SUM(IF($condition_warning, 1, 0)) AS warning_module_count,
- SUM(IF($condition_unknown, 1, 0)) AS unknown_module_count,
- SUM(IF($condition_not_init, 1, 0)) AS notInit_module_count,
- SUM(IF($condition_critical, 1, 0)) AS critical_module_count,
- SUM(IF($condition_normal, 1, 0)) AS normal_module_count,
- COUNT(tae.id_agente_modulo) AS total_count,
- tmg.id_mg,
- tmg.name as n,
- tg.id_grupo
- FROM (
- SELECT tam.id_agente_modulo,
- tam.id_module_group,
- ta.id_grupo AS g,
- tae.estado,
- SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
- FROM tagente_modulo tam
- LEFT JOIN talert_template_modules tatm
- ON tatm.id_agent_module = tam.id_agente_modulo
- AND tatm.times_fired = 1
- LEFT JOIN tagente_estado tae
- ON tae.id_agente_modulo = tam.id_agente_modulo
- INNER JOIN tagente ta
- ON ta.id_agente = tam.id_agente
- WHERE ta.disabled = 0
- AND tam.disabled = 0
- AND tam.delete_pending = 0
- AND ta.id_grupo IN ($ids_group)
- GROUP BY tam.id_agente_modulo
- UNION ALL
- SELECT tam.id_agente_modulo,
- tam.id_module_group,
- tasg.id_group AS g,
- tae.estado,
- SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
- FROM tagente_modulo tam
- LEFT JOIN talert_template_modules tatm
- ON tatm.id_agent_module = tam.id_agente_modulo
- AND tatm.times_fired = 1
- LEFT JOIN tagente_estado tae
- ON tae.id_agente_modulo = tam.id_agente_modulo
- INNER JOIN tagente ta
- ON ta.id_agente = tam.id_agente
- INNER JOIN tagent_secondary_group tasg
- ON ta.id_agente = tasg.id_agent
- WHERE ta.disabled = 0
- AND tam.disabled = 0
- AND tam.delete_pending = 0
- AND tasg.id_group IN ($ids_group)
- GROUP BY tam.id_agente_modulo, tasg.id_group
- ) AS tae
- RIGHT JOIN tgrupo tg
- ON tg.id_grupo = tae.g
- INNER JOIN (
- SELECT * FROM tmodule_group
- UNION ALL
- SELECT 0 AS 'id_mg', 'Nothing' AS 'name'
- ) AS tmg
- ON tae.id_module_group = tmg.id_mg
- GROUP BY tae.g, tmg.id_mg";
+ $sql = sprintf(
+ "SELECT SUM(IF(tae.alert_fired <> 0, 1, 0)) AS alerts_module_count,
+ SUM(IF(%s, 1, 0)) AS warning_module_count,
+ SUM(IF(%s, 1, 0)) AS unknown_module_count,
+ SUM(IF(%s, 1, 0)) AS notInit_module_count,
+ SUM(IF(%s, 1, 0)) AS critical_module_count,
+ SUM(IF(%s, 1, 0)) AS normal_module_count,
+ COUNT(tae.id_agente_modulo) AS total_count,
+ tmg.id_mg,
+ tmg.name as n,
+ tg.id_grupo
+ FROM (
+ SELECT tam.id_agente_modulo,
+ tam.id_module_group,
+ ta.id_grupo AS g,
+ tae.estado,
+ SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
+ FROM tagente_modulo tam
+ LEFT JOIN talert_template_modules tatm
+ ON tatm.id_agent_module = tam.id_agente_modulo
+ AND tatm.times_fired = 1
+ LEFT JOIN tagente_estado tae
+ ON tae.id_agente_modulo = tam.id_agente_modulo
+ INNER JOIN tagente ta
+ ON ta.id_agente = tam.id_agente
+ WHERE ta.disabled = 0
+ AND tam.disabled = 0
+ AND tam.delete_pending = 0
+ AND ta.id_grupo IN (%s)
+ GROUP BY tam.id_agente_modulo
+ UNION ALL
+ SELECT tam.id_agente_modulo,
+ tam.id_module_group,
+ tasg.id_group AS g,
+ tae.estado,
+ SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
+ FROM tagente_modulo tam
+ LEFT JOIN talert_template_modules tatm
+ ON tatm.id_agent_module = tam.id_agente_modulo
+ AND tatm.times_fired = 1
+ LEFT JOIN tagente_estado tae
+ ON tae.id_agente_modulo = tam.id_agente_modulo
+ INNER JOIN tagente ta
+ ON ta.id_agente = tam.id_agente
+ INNER JOIN tagent_secondary_group tasg
+ ON ta.id_agente = tasg.id_agent
+ WHERE ta.disabled = 0
+ AND tam.disabled = 0
+ AND tam.delete_pending = 0
+ AND tasg.id_group IN (%s)
+ GROUP BY tam.id_agente_modulo, tasg.id_group
+ ) AS tae
+ RIGHT JOIN tgrupo tg
+ ON tg.id_grupo = tae.g
+ INNER JOIN (
+ SELECT * FROM tmodule_group
+ UNION ALL
+ SELECT 0 AS 'id_mg', 'Nothing' AS 'name'
+ ) AS tmg
+ ON tae.id_module_group = tmg.id_mg
+ GROUP BY tae.g, tmg.id_mg",
+ $condition_warning,
+ $condition_unknown,
+ $condition_not_init,
+ $condition_critical,
+ $condition_normal,
+ $ids_group,
+ $ids_group
+ );
$array_data_prev = db_get_all_rows_sql($sql);
@@ -220,9 +253,21 @@ function mainModuleGroups()
echo '';
echo '';
+ $cell_style = '
+ min-width: 60px;
+ width: 100%;
+ margin: 0;
+ overflow:hidden;
+ text-align: center;
+ padding: 5px;
+ padding-bottom:10px;
+ font-size: 18px;
+ text-align: center;
+ ';
+
if (true) {
$table = new StdClass();
- $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; padding-right: 10px; min-width: 230px;';
+ $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;';
$table->width = '100%';
$head[0] = __('Groups');
@@ -248,28 +293,28 @@ function mainModuleGroups()
$color = '#FFA631';
// Orange when the cell for this model group and agent has at least one alert fired.
} else if ($array_data[$key][$k]['critical_module_count'] != 0) {
- $color = '#FC4444';
+ $color = '#e63c52';
// Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
} else if ($array_data[$key][$k]['warning_module_count'] != 0) {
- $color = '#FAD403';
+ $color = '#f3b200';
// Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
} else if ($array_data[$key][$k]['unknown_module_count'] != 0) {
$color = '#B2B2B2 ';
// Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state.
} else if ($array_data[$key][$k]['normal_module_count'] != 0) {
- $color = '#80BA27';
+ $color = '#82b92e';
// Green when the cell for this model group and agent has OK state all modules.
} else if ($array_data[$key][$k]['notInit_module_count'] != 0) {
$color = '#5BB6E5';
// Blue when the cell for this module group and all modules have not init value.
}
- $data[$i][$j] = "";
+ $data[$i][$j] = " ';
} else {
- $data[$i][$j] = " ";
+ $data[$i][$j] = " ";
$data[$i][$j] .= 0;
$data[$i][$j] .= ' ';
}
@@ -278,7 +323,7 @@ function mainModuleGroups()
}
} else {
foreach ($value['gm'] as $k => $v) {
- $data[$i][$j] = " ";
+ $data[$i][$j] = " ";
$data[$i][$j] .= 0;
$data[$i][$j] .= ' ';
$j++;
diff --git a/pandora_console/extensions/net_tools.php b/pandora_console/extensions/net_tools.php
index e6ec05977b..ba66cae68e 100644
--- a/pandora_console/extensions/net_tools.php
+++ b/pandora_console/extensions/net_tools.php
@@ -1,26 +1,60 @@
".__('The agent hasn\'t got IP').' ';
- return;
- }
-
- echo "
- ";
-
- echo ' ';
- echo " ';
-
- $operation = get_parameter('operation', 0);
- $community = get_parameter('community', 'public');
- $ip = get_parameter('select_ips');
-
if (!validate_address($ip)) {
- ui_print_error_message(__('The ip or dns name entered cannot be resolved'));
+ ui_print_error_message(__('The ip or dns name entered cannot be resolved'));
} else {
switch ($operation) {
case 1:
@@ -175,7 +147,7 @@ function main_net_tools()
} else {
echo ' '.__('Traceroute to ').$ip.'';
echo ' ';
- echo system("$traceroute $ip");
+ echo system($traceroute.' '.$ip);
echo ' ';
}
break;
@@ -187,7 +159,7 @@ function main_net_tools()
} else {
echo ' '.__('Ping to %s', $ip).'';
echo ' ';
- echo system("$ping -c 5 $ip");
+ echo system($ping.' -c 5 '.$ip);
echo ' ';
}
break;
@@ -199,7 +171,7 @@ function main_net_tools()
} else {
echo ' '.__('Basic TCP Scan on ').$ip.'';
echo ' ';
- echo system("$nmap -F $ip");
+ echo system($nmap.' -F '.$ip);
echo ' ';
}
break;
@@ -212,7 +184,7 @@ function main_net_tools()
ui_print_error_message(__('Dig executable does not exist.'));
} else {
echo ' ';
- echo system("dig $ip");
+ echo system('dig '.$ip);
echo ' ';
}
@@ -221,51 +193,227 @@ function main_net_tools()
ui_print_error_message(__('Whois executable does not exist.'));
} else {
echo ' ';
- echo system("whois $ip");
+ echo system('whois '.$ip);
echo ' ';
}
break;
case 3:
+ $snmp_obj = [
+ 'ip_target' => $ip,
+ 'snmp_version' => $snmp_version,
+ 'snmp_community' => $community,
+ 'format' => '-Oqn',
+ ];
+
+ $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.3.0';
+ $result = get_h_snmpwalk($snmp_obj);
echo ' '.__('SNMP information for ').$ip.'';
-
- $snmpget = whereis_the_command('snmpget');
- if (empty($snmpget)) {
- ui_print_error_message(__('SNMPget executable does not exist.'));
+ echo ' '.__('Uptime').'';
+ echo ' ';
+ if (empty($result)) {
+ ui_print_error_message(__('Target unreachable.'));
+ break;
} else {
- echo ''.__('Uptime').'';
- echo '';
- echo exec("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.3.0 ");
- echo ' ';
- echo ''.__('Device info').'';
- echo '';
-
- echo system("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.1.0 ");
- echo ' ';
-
- echo 'Interface Information';
- echo ' ';
- echo ''.__('Interface');
- echo ' | '.__('Status');
-
- $int_max = exec("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.1.0 ");
-
- for ($ax = 0; $ax < $int_max; $ax++) {
- $interface = exec("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.2.$ax ");
- $estado = exec("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.8.$ax ");
- echo " |
---|
$interface | $estado";
- }
-
- echo ' | ';
+ echo array_pop($result);
}
+
+ echo '';
+ echo ' '.__('Device info').'';
+ echo ' ';
+ $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.1.0';
+ $result = get_h_snmpwalk($snmp_obj);
+ if (empty($result)) {
+ ui_print_error_message(__('Target unreachable.'));
+ break;
+ } else {
+ echo array_pop($result);
+ }
+
+ echo ' ';
+
+ echo ' Interface Information';
+
+ $table = new StdClass();
+ $table->class = 'databox';
+ $table->head = [];
+ $table->head[] = __('Interface');
+ $table->head[] = __('Status');
+
+ $i = 0;
+
+ $base_oid = '.1.3.6.1.2.1.2.2.1';
+ $idx_oids = '.1';
+ $names_oids = '.2';
+ $status_oids = '.8';
+
+ $snmp_obj['base_oid'] = $base_oid.$idx_oids;
+ $idx = get_h_snmpwalk($snmp_obj);
+
+ $snmp_obj['base_oid'] = $base_oid.$names_oids;
+ $names = get_h_snmpwalk($snmp_obj);
+
+ $snmp_obj['base_oid'] = $base_oid.$status_oids;
+ $statuses = get_h_snmpwalk($snmp_obj);
+
+ foreach ($idx as $k => $v) {
+ $index = str_replace($base_oid.$idx_oids, '', $k);
+ $name = $names[$base_oid.$names_oids.$index];
+
+ $status = $statuses[$base_oid.$status_oids.$index];
+
+ $table->data[$i][0] = $name;
+ $table->data[$i++][1] = $status;
+ }
+
+ html_print_table($table);
+ break;
+
+ default:
+ // Ignore.
break;
}
}
+}
+
+
+/**
+ * Main function.
+ *
+ * @return void
+ */
+function main_net_tools()
+{
+ $operation = get_parameter('operation', 0);
+ $community = get_parameter('community', 'public');
+ $ip = get_parameter('select_ips');
+ $snmp_version = get_parameter('select_version');
+
+ // Show form.
+ $id_agente = get_parameter('id_agente', 0);
+ $principal_ip = db_get_sql(
+ sprintf(
+ 'SELECT direccion FROM tagente WHERE id_agente = %d',
+ $id_agente
+ )
+ );
+
+ $list_address = db_get_all_rows_sql(
+ sprintf(
+ 'SELECT id_a FROM taddress_agent WHERE id_agent = %d',
+ $id_agente
+ )
+ );
+ foreach ($list_address as $address) {
+ $ids[] = join(',', $address);
+ }
+
+ $ips = db_get_all_rows_sql(
+ sprintf(
+ 'SELECT ip FROM taddress WHERE id_a IN (%s)',
+ join($ids)
+ )
+ );
+
+ if ($ips == '') {
+ echo " ".__('The agent hasn\'t got IP').' ';
+ return;
+ }
+
+ // Javascript.
+ ?>
+
+ ';
+ echo " ';
+
+ if ($operation) {
+ // Execute form.
+ net_tools_execute($operation, $ip, $community, $snmp_version);
+ }
+
echo ' ';
}
+/**
+ * Add option.
+ *
+ * @return void
+ */
function godmode_net_tools()
{
global $config;
diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.css b/pandora_console/extensions/realtime_graphs/realtime_graphs.css
index ab6c94e238..2219c6152a 100644
--- a/pandora_console/extensions/realtime_graphs/realtime_graphs.css
+++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.css
@@ -11,5 +11,5 @@
#graph_container {
width: 800px;
- margin: 20px auto !important;
+ margin: 20px auto;
}
diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt
deleted file mode 100644
index 82ce1527aa..0000000000
--- a/pandora_console/extras/delete_files/delete_files.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-/general/login_identification_wizard.php
-/general/login_required.php
-/godmode/update_manager/update_manager.messages.php
\ No newline at end of file
diff --git a/pandora_console/extras/mr/29.sql b/pandora_console/extras/mr/29.sql
index 032dd407b1..2bc8b9a8c9 100644
--- a/pandora_console/extras/mr/29.sql
+++ b/pandora_console/extras/mr/29.sql
@@ -1,6 +1,28 @@
START TRANSACTION;
+ALTER TABLE `tmetaconsole_agent` ADD INDEX `id_tagente_idx` (`id_tagente`);
+
DELETE FROM `ttipo_modulo` WHERE `nombre` LIKE 'log4x';
+CREATE TABLE IF NOT EXISTS `tcredential_store` (
+ `identifier` varchar(100) NOT NULL,
+ `id_group` mediumint(4) unsigned NOT NULL DEFAULT 0,
+ `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE') default 'CUSTOM',
+ `username` text,
+ `password` text,
+ `extra_1` text,
+ `extra_2` text,
+ PRIMARY KEY (`identifier`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+INSERT INTO `tcredential_store` (`identifier`, `id_group`, `product`, `username`, `password`) VALUES ("imported_aws_account", 0, "AWS", (SELECT `value` FROM `tconfig` WHERE `token` = "aws_access_key_id" LIMIT 1), (SELECT `value` FROM `tconfig` WHERE `token` = "aws_secret_access_key" LIMIT 1));
+DELETE FROM `tcredential_store` WHERE `username` IS NULL AND `password` IS NULL;
+
+UPDATE `tagente` ta INNER JOIN `tagente` taa on ta.`id_parent` = taa.`id_agente` AND taa.`nombre` IN ("us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "ap-northeast-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1") SET ta.nombre = md5(concat((SELECT `username` FROM `tcredential_store` WHERE `identifier` = "imported_aws_account" LIMIT 1), ta.`nombre`));
+
+UPDATE `tagente` SET `nombre` = md5(concat((SELECT `username` FROM `tcredential_store` WHERE `identifier` = "imported_aws_account" LIMIT 1), `nombre`)) WHERE `nombre` IN ("Aws", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "ap-northeast-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1");
+
+UPDATE `trecon_task` SET `auth_strings` = "imported_aws_account" WHERE `type` IN (2,6,7);
COMMIT;
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index 2c9ff7e7de..4bad7b3652 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -1007,10 +1007,12 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` (
`agent_version` varchar(100) default '',
`ultimo_contacto_remoto` datetime default '1970-01-01 00:00:00',
`disabled` tinyint(2) NOT NULL default '0',
+ `remote` tinyint(1) NOT NULL default '0',
`id_parent` int(10) unsigned default '0',
`custom_id` varchar(255) default '',
`server_name` varchar(100) default '',
`cascade_protection` tinyint(2) NOT NULL default '0',
+ `cascade_protection_module` int(10) unsigned default '0',
`timezone_offset` TINYINT(2) NULL DEFAULT '0' COMMENT 'number of hours of diference with the server timezone' ,
`icon_path` VARCHAR(127) NULL DEFAULT NULL COMMENT 'path in the server to the image of the icon representing the agent' ,
`update_gis_data` TINYINT(1) NOT NULL DEFAULT '1' COMMENT 'set it to one to update the position data (altitude, longitude, latitude) when getting information from the agent or to 0 to keep the last value and do not update it' ,
@@ -1025,19 +1027,21 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` (
`fired_count` bigint(20) NOT NULL default '0',
`update_module_count` tinyint(1) NOT NULL default '0',
`update_alert_count` tinyint(1) NOT NULL default '0',
+ `update_secondary_groups` tinyint(1) NOT NULL default '0',
+ `transactional_agent` tinyint(1) NOT NULL default '0',
+ `alias` varchar(600) BINARY NOT NULL default '',
+ `alias_as_name` tinyint(2) NOT NULL default '0',
+ `safe_mode_module` int(10) unsigned NOT NULL default '0',
+ `cps` int NOT NULL default 0,
PRIMARY KEY (`id_agente`),
KEY `nombre` (`nombre`(255)),
KEY `direccion` (`direccion`),
+ KEY `id_tagente_idx` (`id_tagente`),
KEY `disabled` (`disabled`),
KEY `id_grupo` (`id_grupo`),
FOREIGN KEY (`id_tmetaconsole_setup`) REFERENCES tmetaconsole_setup(`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-ALTER TABLE tmetaconsole_agent ADD COLUMN `remote` tinyint(1) NOT NULL default '0';
-ALTER TABLE tmetaconsole_agent ADD COLUMN `cascade_protection_module` int(10) default '0';
-ALTER TABLE tmetaconsole_agent ADD COLUMN `transactional_agent` tinyint(1) NOT NULL default '0';
-ALTER TABLE tmetaconsole_agent ADD COLUMN `alias` VARCHAR(600) not null DEFAULT '';
-
-- ---------------------------------------------------------------------
-- Table `ttransaction`
-- ---------------------------------------------------------------------
@@ -1235,13 +1239,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
-INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 28);
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 29);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
-INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '735');
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '736');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
-- ---------------------------------------------------------------------
@@ -2192,3 +2196,16 @@ CREATE TABLE `tvisual_console_elements_cache` (
ON UPDATE CASCADE
) engine=InnoDB DEFAULT CHARSET=utf8;
+-- ---------------------------------------------------------------------
+-- Table `tcredential_store`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tcredential_store` (
+ `identifier` varchar(100) NOT NULL,
+ `id_group` mediumint(4) unsigned NOT NULL DEFAULT 0,
+ `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE') default 'CUSTOM',
+ `username` text,
+ `password` text,
+ `extra_1` text,
+ `extra_2` text,
+ PRIMARY KEY (`identifier`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/pandora_console/general/firts_task/recon_view.php b/pandora_console/general/firts_task/recon_view.php
index 282a6b75be..8c59b23f64 100755
--- a/pandora_console/general/firts_task/recon_view.php
+++ b/pandora_console/general/firts_task/recon_view.php
@@ -35,6 +35,7 @@ ui_require_css_file('firts_task');
diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php
index b35123b5d3..dcc894989b 100644
--- a/pandora_console/general/footer.php
+++ b/pandora_console/general/footer.php
@@ -20,6 +20,8 @@ if (isset($_SERVER['REQUEST_TIME'])) {
$time = get_system_time();
}
+ui_require_css_file('footer');
+
$license_file = 'general/license/pandora_info_'.$config['language'].'.html';
if (! file_exists($config['homedir'].$license_file)) {
$license_file = 'general/license/pandora_info_en.html';
@@ -41,9 +43,17 @@ if ($current_package == 0) {
$build_package_version = $current_package;
}
-echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR']));
+echo __(
+ '%s %s - Build %s - MR %s',
+ get_product_name(),
+ $pandora_version,
+ $build_package_version,
+ $config['MR']
+);
+echo ' ';
+echo ''.__('Page generated on %s', date('Y-m-d H:i:s')).'';
+
-echo ' ';
if (isset($config['debug'])) {
$cache_info = [];
diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php
index 86dccfa53a..4fbdf93140 100755
--- a/pandora_console/general/login_page.php
+++ b/pandora_console/general/login_page.php
@@ -19,8 +19,8 @@ if (isset($config['homedir'])) {
ui_require_css_file('login');
-require_once $homedir.'include/functions_ui.php';
-require_once $homedir.'include/functions.php';
+require_once __DIR__.'/../include/functions_ui.php';
+require_once __DIR__.'/../include/functions.php';
require_once __DIR__.'/../include/functions_html.php';
@@ -518,6 +518,7 @@ if ($login_screen == 'error_authconfig' || $login_screen == 'error_emptyconfig'
ui_require_css_file('dialog');
ui_require_css_file('jquery-ui.min', 'include/styles/js/');
ui_require_jquery_file('jquery-ui.min');
+ui_require_jquery_file('jquery-ui_custom');
?>
-
-
-
-
-
-
- class = 'databox';
- $table->cellpadding = 4;
- $table->cellspacing = 4;
- $table->head = [];
- $table->data = [];
- $table->headstyle[0] = 'text-align:center;';
- $table->width = '100%';
- $table->head[0] = ''.__('%s Overview', get_product_name()).'';
- $table->head_colspan[0] = 4;
+echo '';
- // Indicators.
- $tdata = [];
- $stats = reporting_get_stats_indicators($data, 120, 10, false);
- $status = ' ';
- foreach ($stats as $stat) {
- $status .= ''.$stat['title'].' | '.$stat['graph'].' | ';
- }
+//
+// Overview Table.
+//
+$table = new stdClass();
+$table->class = 'no-class';
+$table->cellpadding = 4;
+$table->cellspacing = 4;
+$table->head = [];
+$table->data = [];
+$table->headstyle[0] = 'text-align:center;';
+$table->width = '100%';
+$table->head_colspan[0] = 4;
- $status .= ' ';
- $table->data[0][0] = $status;
- $table->rowclass[] = '';
+// Indicators.
+$tdata = [];
+$stats = reporting_get_stats_indicators($data, 120, 10, false);
+$status = ' ';
+foreach ($stats as $stat) {
+ $status .= ''.$stat['title'].' | '.$stat['graph'].' | ';
+}
- $table->data[] = $tdata;
+$status .= ' ';
+$table->data[0][0] = $status;
+$table->rowclass[] = '';
- // Alerts.
- $tdata = [];
- $tdata[0] = reporting_get_stats_alerts($data);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
+$table->data[] = $tdata;
- // Modules by status.
- $tdata = [];
- $tdata[0] = reporting_get_stats_modules_status($data, 180, 100);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
+// Alerts.
+$tdata = [];
+$tdata[0] = reporting_get_stats_alerts($data);
+$table->rowclass[] = '';
+$table->data[] = $tdata;
- // Total agents and modules.
- $tdata = [];
- $tdata[0] = reporting_get_stats_agents_monitors($data);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
+// Modules by status.
+$tdata = [];
+$tdata[0] = reporting_get_stats_modules_status($data, 180, 100);
+$table->rowclass[] = '';
+$table->data[] = $tdata;
- // Users.
- if (users_is_admin()) {
- $tdata = [];
- $tdata[0] = reporting_get_stats_users($data);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
- }
+// Total agents and modules.
+$tdata = [];
+$tdata[0] = reporting_get_stats_agents_monitors($data);
+$table->rowclass[] = '';
+$table->data[] = $tdata;
- html_print_table($table);
- unset($table);
- ?>
-
-
- |
-
-
-
-
- rowclass[] = '';
+ $table->data[] = $tdata;
+}
+
+ui_toggle(
+ html_print_table($table, true),
+ __('%s Overview', get_product_name()),
+ '',
+ 'overview',
+ false
+);
+unset($table);
+
+echo '';
+
+// News.
+$options = [];
+$options['id_user'] = $config['id_user'];
+$options['modal'] = false;
+$options['limit'] = 3;
+$news = get_news($options);
- if (!empty($news)) {
- // NEWS BOARD.
- echo ' ';
+if (!empty($news)) {
+ ui_require_css_file('news');
+ // NEWS BOARD.
+ if ($config['prominent_time'] == 'timestamp') {
+ $comparation_suffix = '';
+ } else {
+ $comparation_suffix = __('ago');
+ }
- echo ' ';
- echo ''.__('News board').' | ';
- if ($config['prominent_time'] == 'timestamp') {
- $comparation_suffix = '';
- } else {
- $comparation_suffix = __('ago');
- }
+ $output_news = '';
+ foreach ($news as $article) {
+ $image = false;
+ if ($article['text'] == '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&gt; Site news.</p> ') {
+ $image = true;
+ }
- foreach ($news as $article) {
- $image = false;
- if ($article['text'] == '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&gt; Site news.</p> ') {
- $image = true;
- }
+ $text_bbdd = io_safe_output($article['text']);
+ $text = html_entity_decode($text_bbdd);
+ $output_news .= ' '.$article['subject'].'';
+ $output_news .= ' ';
+ $output_news .= ' '.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.' ';
+ if ($image) {
+ $output_news .= '  ';
+ }
- $text_bbdd = io_safe_output($article['text']);
- $text = html_entity_decode($text_bbdd);
- echo ' '.$article['subject'].' |
---|
';
- echo ' '.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.' | ';
- echo ' ';
- if ($image) {
- echo ' ';
- }
+ $output_news .= nl2br($text);
+ $output_news .= '';
+ }
- echo nl2br($text);
- echo ' | ';
- }
+ $output_news .= ' ';
- echo ' ';
- echo ' ';
- // News board.
- echo ' ';
+ // News board.
+ ui_toggle(
+ $output_news,
+ __('News board'),
+ '',
+ 'news',
+ false
+ );
+ // END OF NEWS BOARD.
+}
- // END OF NEWS BOARD.
- }
-
- // LAST ACTIVITY.
- // Show last activity from this user.
- echo ' ';
-
- $table = new stdClass();
- $table->class = 'info_table';
- $table->cellpadding = 0;
- $table->cellspacing = 0;
- $table->width = '100%';
- // Don't specify px.
- $table->data = [];
- $table->size = [];
- $table->size[0] = '5%';
- $table->size[1] = '15%';
- $table->size[2] = '15%';
- $table->size[3] = '10%';
- $table->size[4] = '25%';
- $table->head = [];
- $table->head[0] = __('User');
- $table->head[1] = __('Action');
- $table->head[2] = __('Date');
- $table->head[3] = __('Source IP');
- $table->head[4] = __('Comments');
- $table->title = ' '.__('This is your last activity performed on the %s console', get_product_name()).'';
- $sql = sprintf(
- 'SELECT id_usuario,accion, ip_origen,descripcion,utimestamp
- FROM tsesion
- WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
- AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 10",
- $config['id_user']
- );
+// LAST ACTIVITY.
+// Show last activity from this user.
+$table = new stdClass();
+$table->class = 'no-td-padding info_table';
+$table->cellpadding = 0;
+$table->cellspacing = 0;
+$table->width = '100%';
+// Don't specify px.
+$table->data = [];
+$table->size = [];
+$table->headstyle = [];
+$table->size[0] = '5%';
+$table->size[1] = '15%';
+$table->headstyle[1] = 'min-width: 12em;';
+$table->size[2] = '5%';
+$table->headstyle[2] = 'min-width: 65px;';
+$table->size[3] = '10%';
+$table->size[4] = '25%';
+$table->head = [];
+$table->head[0] = __('User');
+$table->head[1] = __('Action');
+$table->head[2] = __('Date');
+$table->head[3] = __('Source IP');
+$table->head[4] = __('Comments');
+$table->align[4] = 'left';
+$sql = sprintf(
+ 'SELECT id_usuario,accion, ip_origen,descripcion,utimestamp
+ FROM tsesion
+ WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
+ AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 10",
+ $config['id_user']
+);
- $sessions = db_get_all_rows_sql($sql);
+$sessions = db_get_all_rows_sql($sql);
- if ($sessions === false) {
- $sessions = [];
- }
+if ($sessions === false) {
+ $sessions = [];
+}
- foreach ($sessions as $session) {
- $data = [];
- $session_id_usuario = $session['id_usuario'];
- $session_ip_origen = $session['ip_origen'];
+foreach ($sessions as $session) {
+ $data = [];
+ $session_id_usuario = $session['id_usuario'];
+ $session_ip_origen = $session['ip_origen'];
+ $data[0] = ' '.$session_id_usuario.'';
+ $data[1] = ui_print_session_action_icon($session['accion'], true).' '.$session['accion'];
+ $data[2] = ui_print_help_tip(
+ date($config['date_format'], $session['utimestamp']),
+ true
+ ).human_time_comparation($session['utimestamp'], 'tiny');
+ $data[3] = $session_ip_origen;
+ $description = str_replace([',', ', '], ', ', $session['descripcion']);
+ if (strlen($description) > 100) {
+ $data[4] = ' '.io_safe_output(substr($description, 0, 150).'...').' ';
+ } else {
+ $data[4] = ' '.io_safe_output($description).' ';
+ }
- $data[0] = ' '.$session_id_usuario.'';
- $data[1] = ui_print_session_action_icon($session['accion'], true).' '.$session['accion'];
- $data[2] = ui_print_help_tip(
- date($config['date_format'], $session['utimestamp']),
- true
- ).human_time_comparation($session['utimestamp'], 'tiny');
- $data[3] = $session_ip_origen;
- $description = str_replace([',', ', '], ', ', $session['descripcion']);
- if (strlen($description) > 100) {
- $data[4] = ' '.io_safe_output(substr($description, 0, 150).'...').' ';
- } else {
- $data[4] = ' '.io_safe_output($description).' ';
- }
+ array_push($table->data, $data);
+}
- array_push($table->data, $data);
- }
+$activity .= html_print_table($table, true);
+unset($table);
- echo " ";
- html_print_table($table);
- unset($table);
- echo ' ';
- echo ' ';
- // END OF LAST ACTIVIYY.
- ?>
-
-
- |
-
-
-
+ui_toggle(
+ $activity,
+ __('Latest activity'),
+ '',
+ 'activity',
+ false,
+ false,
+ '',
+ 'white-box-content padded'
+);
+// END OF LAST ACTIVIYY.
+// Close right panel.
+echo '';
+
+// Close welcome panel.
+echo '';
diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php
index 877f171090..ca6c0fd473 100644
--- a/pandora_console/general/main_menu.php
+++ b/pandora_console/general/main_menu.php
@@ -30,12 +30,6 @@ $(document).ready(function(){
}
});
-
-// Set the height of the menu.
-$(window).on('load', function (){
- $("#menu_full").height($("#container").height());
-});
-
data[1] = $data;
$form = '';
-ui_toggle($form, __('Filter'), '', false);
+ui_toggle($form, __('Filter'), '', '', false);
$filter = '1=1';
diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index dfdd7390c3..3ea3a7f0c2 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -176,7 +176,7 @@ if ($disk_conf_delete) {
@unlink($filename['conf']);
}
-echo ' |