diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf
index 520eaff838..c4c9d8e42e 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.727, AIX version
+# Version 7.0NG.728, 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 c81ad7428b..53b7e5ed5d 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.727, FreeBSD Version
+# Version 7.0NG.728, 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 50fc5ba4be..f12d0518f2 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.727, HP-UX Version
+# Version 7.0NG.728, 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 82830cf957..9c36a4211c 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.727, GNU/Linux
+# Version 7.0NG.728, 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 ea633488e4..5870e5283a 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.727, GNU/Linux
+# Version 7.0NG.728, 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 c8a2153376..e6e468401e 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.727, Solaris Version
+# Version 7.0NG.728, 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 6a01d22b4b..e1feeacc4e 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.727
+# Version 7.0NG.728
# 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 27cbee7dfb..8d9e405b99 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.727, AIX version
+# Version 7.0NG.728, 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 6eaf0415c2..f428ddf5e1 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.727
+# Version 7.0NG.728
# 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 906269e8bb..6f1eded2ef 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.727, HPUX Version
+# Version 7.0NG.728, HPUX Version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf
index b2cdc0e920..26b099a519 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.727
+# Version 7.0NG.728
# 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 82363fdb43..4f23ce219e 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.727
+# Version 7.0NG.728
# 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 2b4f58566b..8f272695ac 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.727
+# Version 7.0NG.728
# 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 a1c4130f17..cce42277f7 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.727, Solaris version
+# Version 7.0NG.728, Solaris version
# General Parameters
# ==================
diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index 0d640badaa..476c53874f 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.727, AIX version
+# Version 7.0NG.728, 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 3640efdea4..93d8cf3cbf 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.727-181022
+Version: 7.0NG.728-181025
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 17c585dc0d..0e6d0fb01e 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.727-181022"
+pandora_version="7.0NG.728-181025"
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 53dd20cf4f..ac53da9443 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.727, GNU/Linux
+# Version 7.0NG.728, 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 3590ee6551..12f0f7d805 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.727, FreeBSD Version
+# Version 7.0NG.728, 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 aa1dcb1592..3339e5443d 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.727, HP-UX Version
+# Version 7.0NG.728, 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 fc55d1d872..58fb118e99 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.727, GNU/Linux
+# Version 7.0NG.728, 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 7a47602abc..a47ae7137b 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.727, GNU/Linux
+# Version 7.0NG.728, 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 42d8c19a25..701ee400e7 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.727, NetBSD Version
+# Version 7.0NG.728, 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 625bc89848..95152aadf3 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.727, Solaris Version
+# Version 7.0NG.728, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/collections/.empty b/pandora_agents/unix/collections/.empty
deleted file mode 100644
index 8d1c8b69c3..0000000000
--- a/pandora_agents/unix/collections/.empty
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index f24407df38..cc1eb4ee08 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.727';
-use constant AGENT_BUILD => '181022';
+use constant AGENT_VERSION => '7.0NG.728';
+use constant AGENT_BUILD => '181025';
# 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 268d4809be..d0ec7f42a0 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.727
-%define release 181022
+%define version 7.0NG.728
+%define release 181025
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
@@ -95,7 +95,7 @@ if [ ! -e /etc/pandora/plugins ]; then
fi
if [ ! -e /etc/pandora/collections ]; then
- ln -s /usr/share/pandora_agent/collections /etc/pandora
+ mkdir -p /etc/pandora/collections
fi
mkdir -p /var/spool/pandora/data_out
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 46c6ca011d..b37f906bea 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.727
-%define release 181022
+%define version 7.0NG.728
+%define release 181025
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
@@ -88,7 +88,7 @@ if [ ! -e /etc/pandora/plugins ]; then
fi
if [ ! -e /etc/pandora/collections ]; then
- ln -s /usr/share/pandora_agent/collections /etc/pandora
+ mkdir /etc/pandora/collections
fi
cp -aRf /usr/share/pandora_agent/pandora_agent_logrotate /etc/logrotate.d/pandora_agent
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 77c8ca8552..981a8e3d68 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.727"
-PI_BUILD="181022"
+PI_VERSION="7.0NG.728"
+PI_BUILD="181025"
OS_NAME=`uname -s`
FORCE=0
@@ -388,8 +388,8 @@ install () {
ln -s $PANDORA_BASE_REAL$PANDORA_HOME/plugins $PANDORA_BASE$PANDORA_CFG
- echo "Copying Pandora FMS Agent collections to $PANDORA_BASE$PANDORA_HOME/collections..."
- cp -r collections $PANDORA_BASE$PANDORA_HOME
+ echo "Creating the collections directory in to $PANDORA_BASE$PANDORA_HOME/collections..."
+ mkdir -p $PANDORA_BASE$PANDORA_HOME/collections
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/collections
ln -s $PANDORA_BASE_REAL$PANDORA_HOME/collections $PANDORA_BASE$PANDORA_CFG
diff --git a/pandora_agents/win32/bin/collections/.empty b/pandora_agents/win32/bin/collections/.empty
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf
index 0901ac5234..bb4d1a6923 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.727
+# Version 7.0NG.728
# 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 31e08f7921..7019fcf229 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.727}
+{Pandora FMS Windows Agent v7.0NG.728}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{181022}
+{181025}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/misc/cron.cc b/pandora_agents/win32/misc/cron.cc
index d712c2685c..2d3e5e0440 100644
--- a/pandora_agents/win32/misc/cron.cc
+++ b/pandora_agents/win32/misc/cron.cc
@@ -227,7 +227,7 @@ int Cron::getResetValue (int position) {
* @return false if should not execute
*/
bool Cron::shouldExecuteAt (time_t date) {
- return this->utimestamp < date;
+ return this->utimestamp <= date;
}
/**
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 433930f10f..54c6b626f9 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.727(Build 181022)")
+#define PANDORA_VERSION ("7.0NG.728(Build 181025)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index f1986cb8e2..640dedbb35 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.727(Build 181022))"
+ VALUE "ProductVersion", "(7.0NG.728(Build 181025))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 17b6956d8a..86769b7615 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.727-181022
+Version: 7.0NG.728-181025
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 c381d332fe..f940e5bbb5 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.727-181022"
+pandora_version="7.0NG.728-181025"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extensions/insert_data.php b/pandora_console/extensions/insert_data.php
index 5cfcc331d0..b930462fe5 100644
--- a/pandora_console/extensions/insert_data.php
+++ b/pandora_console/extensions/insert_data.php
@@ -48,7 +48,7 @@ function createXMLData($agent, $agentModule, $time, $data) {
$data
);
- $file_name = $config["remote_config"] . "/" . io_safe_output($agent["alias"]) . "." . str_replace($time, " ", "_") . ".data";
+ $file_name = $config["remote_config"] . "/" . io_safe_output($agent["alias"]) . "." . strtotime($time) . ".data";
return (bool) @file_put_contents($file_name, $xml);
}
@@ -115,7 +115,7 @@ function mainInsertData() {
$utimestamp = strtotime($date . " " . $time) - get_fixed_offset();
$timestamp = date(DATE_FORMAT . " " . TIME_FORMAT, $utimestamp);
$result = createXMLData($agent, $agentModule, $timestamp, $data);
-
+
if ($result) {
$done++;
}
diff --git a/pandora_console/extensions/realtime_graphs/ajax.php b/pandora_console/extensions/realtime_graphs/ajax.php
index 7c3eb0c3b5..caea2bda86 100644
--- a/pandora_console/extensions/realtime_graphs/ajax.php
+++ b/pandora_console/extensions/realtime_graphs/ajax.php
@@ -77,6 +77,15 @@ switch($graph) {
if (count($data_array) > 1) {
$data = $data_array[1];
}
+ // Redefine boolean data
+ switch ($data) {
+ case "up(1)":
+ $data = 1;
+ break;
+ case "down(0)":
+ $data = 0;
+ break;
+ }
}
}
break;
diff --git a/pandora_console/extras/mr/22.sql b/pandora_console/extras/mr/22.sql
index b8e352738e..d0a099460b 100644
--- a/pandora_console/extras/mr/22.sql
+++ b/pandora_console/extras/mr/22.sql
@@ -2,4 +2,6 @@ START TRANSACTION;
ALTER TABLE `tusuario` DROP COLUMN `flash_chart`;
-COMMIT;
\ No newline at end of file
+ALTER TABLE tlayout_template MODIFY `name` varchar(600) NOT NULL;
+
+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 f645cb19b9..8980cf0982 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
@@ -1741,6 +1741,8 @@ CREATE TABLE IF NOT EXISTS `tlayout_template` (
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
+ALTER TABLE tlayout_template MODIFY `name` varchar(600) NOT NULL;
+
-- ---------------------------------------------------------------------
-- Table `tlayout_template_data`
-- ---------------------------------------------------------------------
diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php
index c2ecec56da..bab96a8fb2 100644
--- a/pandora_console/general/logon_ok.php
+++ b/pandora_console/general/logon_ok.php
@@ -210,6 +210,7 @@ if (!empty($all_data)) {
echo '
';
$table = new stdClass();
+ $table->class = "databox data";
$table->width = '100%'; //Don't specify px
$table->data = array ();
$table->size = array ();
@@ -274,7 +275,12 @@ if (!empty($all_data)) {
. human_time_comparation($session['utimestamp'], 'tiny');
$data[3] = $session_ip_origen;
$description = str_replace(array(',', ', '), ', ', $session['descripcion']);
- $data[4] = '
' . io_safe_output($description) . '
';
+ 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);
}
diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php
index 4af38ec669..658f7dd9fc 100644
--- a/pandora_console/godmode/admin_access_logs.php
+++ b/pandora_console/godmode/admin_access_logs.php
@@ -233,7 +233,7 @@ foreach ($result as $row) {
$data[2] = ui_print_help_tip(date($config["date_format"], $row["utimestamp"]), true)
. ui_print_timestamp($row["utimestamp"], true);
$data[3] = $row["ip_origen"];
- $data[4] = $row["descripcion"];
+ $data[4] = io_safe_output($row["descripcion"]);
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
$data[5] = enterprise_hook("cell1EntepriseAudit", array($row["id_sesion"]));
diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
index e27c014a1f..7e1e8bd2f7 100644
--- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
+++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
@@ -541,7 +541,7 @@ if (!empty($interfaces_list)) {
$table->data[0][1] = '';
$table->data[0][2] = '
'.__('Modules').'';
- $table->data[1][0] = html_print_select ($interfaces_list, 'id_snmp[]', 0, false, '', '', true, true, true, '', false, 'width:500px;');
+ $table->data[1][0] = html_print_select ($interfaces_list, 'id_snmp[]', 0, false, '', '', true, true, true, '', false, 'width:500px; overflow: auto;');
$table->data[1][1] = html_print_image('images/darrowright.png', true);
$table->data[1][2] = html_print_select (array (), 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:200px;');
$table->data[1][2] .= html_print_input_hidden('agent', $id_agent, true);
diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index 49a9a85d9a..36b67da66f 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -1772,13 +1772,15 @@ if (!empty($duplicate_module)) { // DUPLICATE agent module !
// =====================
if ($enable_module) {
$result = modules_change_disabled($enable_module, 0);
-
+ $modulo_nombre = db_get_row_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = ".$enable_module."");
+ $modulo_nombre = $modulo_nombre['nombre'];
+
if ($result === NOERR) {
enterprise_hook('config_agents_enable_module_conf', array($id_agente, $enable_module));
- db_pandora_audit("Module management", 'Enable ' . $enable_module);
+ db_pandora_audit("Module management", 'Enable #' . $enable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]);
}
else {
- db_pandora_audit("Module management", 'Fail to enable ' . $enable_module);
+ db_pandora_audit("Module management", 'Fail to enable #' . $enable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]);
}
ui_print_result_message ($result,
@@ -1787,13 +1789,15 @@ if ($enable_module) {
if ($disable_module) {
$result = modules_change_disabled($disable_module, 1);
-
+ $modulo_nombre = db_get_row_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = ".$disable_module."");
+ $modulo_nombre = $modulo_nombre['nombre'];
+
if ($result === NOERR) {
enterprise_hook('config_agents_disable_module_conf', array($id_agente, $disable_module));
- db_pandora_audit("Module management", 'Disable ' . $disable_module);
+ db_pandora_audit("Module management", 'Disable #' . $disable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]);
}
else {
- db_pandora_audit("Module management", 'Fail to disable ' . $disable_module);
+ db_pandora_audit("Module management", 'Fail to disable #' . $disable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]);
}
ui_print_result_message ($result,
diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php
index dc606ad1f5..ff06f4c4f7 100644
--- a/pandora_console/godmode/agentes/module_manager.php
+++ b/pandora_console/godmode/agentes/module_manager.php
@@ -139,7 +139,7 @@ if (($policy_page) || (isset($agent))) {
echo '';
}
echo '
';
- echo __("Type");
+ echo __(" Type ");
html_print_select ($modules, 'moduletype', '', '', '', '', false, false, false, '', false, 'max-width:300px;' );
html_print_input_hidden ('edit_module', 1);
echo ' | ';
@@ -607,7 +607,7 @@ foreach ($modules as $module) {
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
$table->colspan[$i - 1][0] = 10;
else
- $table->colspan[$i - 1][0] = 8;
+ $table->colspan[$i - 1][0] = 9;
$data = array ();
}
diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php
index 1bf189c660..f9347c8b9b 100644
--- a/pandora_console/godmode/agentes/module_manager_editor.php
+++ b/pandora_console/godmode/agentes/module_manager_editor.php
@@ -34,6 +34,11 @@ if (is_ajax ()) {
// Decrypt passwords in the component.
$component['plugin_pass'] = io_output_password($component['plugin_pass']);
+
+ $component['str_warning'] = io_safe_output($component['str_warning']);
+ $component['str_critical'] = io_safe_output($component['str_critical']);
+ $component['warning_inverse'] = (bool)$component['warning_inverse'];
+ $component['critical_inverse'] = (bool)$component['critical_inverse'];
echo io_json_mb_encode ($component);
return;
diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php
index 3bad38b982..a80ba40a23 100644
--- a/pandora_console/godmode/alerts/alert_actions.php
+++ b/pandora_console/godmode/alerts/alert_actions.php
@@ -179,9 +179,23 @@ if ($create_action) {
db_pandora_audit("Command management", "Fail try to create alert action", false, false);
}
- ui_print_result_message ($result,
+
+ /* Show errors */
+ if (!isset($messageAction)) {
+ $messageAction = __('Could not be created');
+ }
+
+ if ($name == "") {
+ $messageAction = __('No name specified');
+ }
+
+ if ($id_alert_command == "") {
+ $messageAction = __('No command specified');
+ }
+
+ $messageAction = ui_print_result_message ($result,
__('Successfully created'),
- __('Could not be created'));
+ $messageAction);
}
if ($update_action) {
diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php
index 09e868f951..9ca4ea501a 100644
--- a/pandora_console/godmode/alerts/alert_commands.php
+++ b/pandora_console/godmode/alerts/alert_commands.php
@@ -307,9 +307,22 @@ if ($create_command) {
db_pandora_audit("Command management", "Fail try to create alert command", false, false);
}
- ui_print_result_message ($result,
+ /* Show errors */
+ if (!isset($messageAction)) {
+ $messageAction = __('Could not be created');
+ }
+
+ if ($name == "") {
+ $messageAction = __('No name specified');
+ }
+
+ if ($command == "") {
+ $messageAction = __('No command specified');
+ }
+
+ $messageAction = ui_print_result_message ($result,
__('Successfully created'),
- __('Could not be created'));
+ $messageAction);
}
diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php
index 9a6badcc24..4df1ec4be5 100644
--- a/pandora_console/godmode/alerts/alert_list.php
+++ b/pandora_console/godmode/alerts/alert_list.php
@@ -126,9 +126,24 @@ if ($create_alert) {
"Fail Added alert '$unsafe_alert_template_name' for module '$unsafe_module_name' in agent '$unsafe_agent_alias'");
}
- $messageAction = ui_print_result_message ($id,
- __('Successfully created'), __('Could not be created'), '', true);
+
+ /* Show errors */
+ if (!isset($messageAction)) {
+ $messageAction = __('Could not be created');
+ }
+ if ($id_alert_template == "") {
+ $messageAction = __('No template specified');
+ }
+
+ if ($id_agent_module == "") {
+ $messageAction = __('No module specified');
+ }
+
+ $messageAction = ui_print_result_message ($id,
+ __('Successfully created'), $messageAction, '', true);
+
+
if ($id !== false) {
$action_select = get_parameter('action_select');
diff --git a/pandora_console/godmode/alerts/alert_special_days.php b/pandora_console/godmode/alerts/alert_special_days.php
index 03ce7a90ca..e5fbf4d21e 100644
--- a/pandora_console/godmode/alerts/alert_special_days.php
+++ b/pandora_console/godmode/alerts/alert_special_days.php
@@ -136,6 +136,7 @@ if ($create_special_day) {
$date_check = db_get_value_filter ('date', 'talert_special_days', $filter);
if ($date_check == $date) {
$result = '';
+ $messageAction = __('Could not be created, it already exists');
}
else {
$result = alerts_create_alert_special_day ($date, $same_day, $values);
@@ -149,10 +150,16 @@ if ($create_special_day) {
else {
db_pandora_audit("Command management", "Fail try to create special day", false, false);
}
-
- ui_print_result_message ($result,
+
+
+ /* Show errors */
+ if (!isset($messageAction)) {
+ $messageAction = __('Could not be created');
+ }
+
+ $messageAction = ui_print_result_message ($result,
__('Successfully created'),
- __('Could not be created'));
+ $messageAction);
}
if ($update_special_day) {
@@ -194,6 +201,7 @@ if ($update_special_day) {
$date_check = db_get_value_filter ('date', 'talert_special_days', $filter);
if ($date_check == $date) {
$result = '';
+ $messageAction = __('Could not be updated, it already exists');
}
else {
$result = alerts_update_alert_special_day ($id, $values);
@@ -213,9 +221,15 @@ if ($update_special_day) {
db_pandora_audit("Command management", "Fail to update special day " . $id, false, false);
}
- ui_print_result_message ($result,
+
+ /* Show errors */
+ if (!isset($messageAction)) {
+ $messageAction = __('Could not be updated');
+ }
+
+ $messageAction = ui_print_result_message ($result,
__('Successfully updated'),
- __('Could not be updated'));
+ $messageAction);
}
if ($delete_special_day) {
diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php
index 5fc232490a..b75b26561f 100644
--- a/pandora_console/godmode/alerts/configure_alert_template.php
+++ b/pandora_console/godmode/alerts/configure_alert_template.php
@@ -428,9 +428,21 @@ if ($create_template) {
json_encode($values));
}
- ui_print_result_message ($result,
+
+ /* Show errors */
+ if (!isset($messageAction)) {
+ $messageAction = __('Could not be created');
+ }
+
+ if ($name == "") {
+ $messageAction = __('No template name specified');
+ }
+
+ $messageAction = ui_print_result_message ($result,
__('Successfully created'),
- __('Could not be created'));
+ $messageAction);
+
+
/* Go to previous step in case of error */
if ($result === false)
$step = $step - 1;
diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php
index 8725c713aa..047eb08b75 100755
--- a/pandora_console/godmode/massive/massive_delete_modules.php
+++ b/pandora_console/godmode/massive/massive_delete_modules.php
@@ -274,7 +274,7 @@ $table->data['form_modules_1'][1] = html_print_select ($types, 'module_type', ''
'width:100%');
$table->data['form_modules_1'][3] = __('Select all modules of this type') . ' ' .
html_print_checkbox_extended("force_type", 'type', '', '', false,
- '', 'style="margin-right: 40px;"', true);
+ 'style="margin-right: 40px;"', true, '');
$modules = array ();
if ($module_type != '') {
diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php
index a7056636b0..949d13269a 100755
--- a/pandora_console/godmode/massive/massive_edit_modules.php
+++ b/pandora_console/godmode/massive/massive_edit_modules.php
@@ -271,7 +271,7 @@ $table->data['form_modules_1'][1] = html_print_select ($types,
$table->data['form_modules_1'][3] = __('Select all modules of this type') . ' ' .
html_print_checkbox_extended ("force_type", 'type', '', '', false,
- '', 'style="margin-right: 40px;"', true);
+ 'style="margin-right: 40px;"', true, '');
$modules = array ();
if ($module_type != '') {
diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php
index 152369943c..eaeae908cb 100644
--- a/pandora_console/godmode/modules/manage_network_components_form_common.php
+++ b/pandora_console/godmode/modules/manage_network_components_form_common.php
@@ -125,7 +125,7 @@ $table->data[4][1] .= html_print_input_text ('max_warning', $max_warning,
'', 5, 15, true) . '';
$table->data[4][1] .= '
'.__('Str.').' ';
$table->data[4][1] .= html_print_input_text ('str_warning', $str_warning,
- '', 5, 15, true) . '';
+ '', 5, 64, true) . '';
$table->data[4][1] .= '
'.__('Inverse interval').'';
$table->data[4][1] .= html_print_checkbox ("warning_inverse", 1, $warning_inverse, true);
@@ -142,7 +142,7 @@ $table->data[5][1] .= html_print_input_text ('max_critical', $max_critical,
'', 5, 15, true) . '';
$table->data[5][1] .= '
'.__('Str.').' ';
$table->data[5][1] .= html_print_input_text ('str_critical', $str_critical,
- '', 5, 15, true) . '';
+ '', 5, 64, true) . '';
$table->data[5][1] .= '
'.__('Inverse interval').'';
$table->data[5][1] .= html_print_checkbox ("critical_inverse", 1, $critical_inverse, true);
diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php
index 564c179f67..957720f59c 100644
--- a/pandora_console/godmode/reporting/graph_builder.php
+++ b/pandora_console/godmode/reporting/graph_builder.php
@@ -195,7 +195,8 @@ if ($add_module) {
"')");
if (count($id_agent_modules) > 0 && $id_agent_modules != '') {
- $order = db_get_row_sql("SELECT `field_order` from tgraph_source ORDER BY `field_order` DESC");
+ $order = db_get_row_sql("SELECT `field_order` from tgraph_source WHERE id_graph=$id_graph ORDER BY `field_order` DESC");
+
$order = $order['field_order'];
foreach($id_agent_modules as $id_agent_module){
$order++;
@@ -207,8 +208,13 @@ if ($add_module) {
}
if ($delete_module) {
+ $id_graph = get_parameter('id');
+
$deleteGraph = get_parameter('delete');
+ $order_val = db_get_value('field_order', 'tgraph_source', 'id_gs', $deleteGraph);
$result = db_process_sql_delete('tgraph_source', array('id_gs' => $deleteGraph));
+ db_process_sql ('UPDATE tgraph_source SET field_order=field_order-1 WHERE id_graph='.$id_graph.' AND field_order>'.$order_val);
+
}
if ($change_weight) {
diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php
index d323727aa6..b935f4fc13 100644
--- a/pandora_console/godmode/setup/setup_general.php
+++ b/pandora_console/godmode/setup/setup_general.php
@@ -222,7 +222,7 @@ $table->data[36][0] = __('Include agents manually disabled');
$table->data[36][1] = __('Yes').' '.html_print_radio_button ('include_agents', 1, '', $config["include_agents"], true).' ';
$table->data[36][1] .= __('No').' '.html_print_radio_button ('include_agents', 0, '', $config["include_agents"], true);
-$table->data[37][0] = __('audit log directory') .
+$table->data[37][0] = __('Audit log directory') .
ui_print_help_tip (__("Directory where audit log is stored."), true);
$table->data[37][1] = html_print_input_text ('auditdir', io_safe_output($config["auditdir"]), '', 30, 100, true);
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index 00a968fc04..fa471659b6 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -83,13 +83,8 @@ $table_behaviour->data[$row][1] = html_print_checkbox('paginate_module', 1,
$row++;
$table_behaviour->data[$row][0] = __('Display data of proc modules in other format');
-$table_behaviour->data[$row][1] = __('Yes') . ' ' .
- html_print_radio_button ('render_proc', 1, '',
- $config["render_proc"], true) .
- ' ';
-$table_behaviour->data[$row][1] .= __('No') . ' ' .
- html_print_radio_button ('render_proc', 0, '',
- $config["render_proc"], true);
+$table_behaviour->data[$row][1] = html_print_checkbox('render_proc', 1,
+ $config['render_proc'], true);
$row++;
$table_behaviour->data[$row][0] = __('Display text proc modules have state is ok');
@@ -103,13 +98,8 @@ $row++;
//Daniel maya 02/06/2016 Display menu with click --INI
$table_behaviour->data[$row][0] = __('Click to display lateral menus').
ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true);
-$table_behaviour->data[$row][1] = __('Yes') . ' ' .
- html_print_radio_button ('click_display', 1, '',
- $config["click_display"], true) .
- ' ';
-$table_behaviour->data[$row][1] .= __('No') . ' ' .
- html_print_radio_button ('click_display', 0, '',
- $config["click_display"], true);
+$table_behaviour->data[$row][1] = html_print_checkbox('click_display', 1,
+ $config['click_display'], true);
$row++;
//Daniel maya 02/06/2016 Display menu with click --END
@@ -126,13 +116,8 @@ if (enterprise_installed()) {
$table_behaviour->data[$row][0] = __('Classic menu mode').
ui_print_help_tip(__('Text menu options always visible, don\'t hide'), true);
-$table_behaviour->data[$row][1] = __('Yes') . ' ' .
- html_print_radio_button ('classic_menu', 1, '',
- $config["classic_menu"], true) .
- ' ';
-$table_behaviour->data[$row][1] .= __('No') . ' ' .
- html_print_radio_button ('classic_menu', 0, '',
- $config["classic_menu"], true);
+$table_behaviour->data[$row][1] = html_print_checkbox('classic_menu', 1,
+ $config['classic_menu'], true);
$row++;
echo "