diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 9880d55476..eb17d47c21 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.744, AIX version +# Version 7.0NG.745, 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 5f18593278..51972f7e78 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.744, FreeBSD Version +# Version 7.0NG.745, 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 8c09c2e1db..f562ee4053 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.744, HP-UX Version +# Version 7.0NG.745, 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 b2989b95e8..4c1178a025 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.744, GNU/Linux +# Version 7.0NG.745, 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 a708087446..c254df3ed4 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.744, GNU/Linux +# Version 7.0NG.745, 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 6ae2ae474f..46e3c5c0db 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.744, Solaris Version +# Version 7.0NG.745, 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 4d2b4dc5c4..f1a79ad265 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.744 +# Version 7.0NG.745 # 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 f0bf132498..b2eac4399a 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.744, AIX version +# Version 7.0NG.745, 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 3a79c9f3dc..094c2f850b 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.744 +# Version 7.0NG.745 # 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 dbb5c3e79f..6b1779741e 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.744, HPUX Version +# Version 7.0NG.745, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index 0351cb9fea..cb94b50604 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.744 +# Version 7.0NG.745 # 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 660a616e40..779da4af44 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.744 +# Version 7.0NG.745 # 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 6303271947..fd9a754f23 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.744 +# Version 7.0NG.745 # 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 fd40952a8e..934e8092c8 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.744, Solaris version +# Version 7.0NG.745, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 2860d5f0bc..59dfa821b8 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.744, AIX version +# Version 7.0NG.745, 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 41729be605..5277fa8cf5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.744-200415 +Version: 7.0NG.745-200514 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 109cb398bf..8c12084f09 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.744-200415" +pandora_version="7.0NG.745-200514" 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 3477cb8ff2..9f1321be59 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.744, GNU/Linux +# Version 7.0NG.745, 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 1c38ab4504..ef101119e1 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.744, FreeBSD Version +# Version 7.0NG.745, 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 7ec21a8215..ac1d967039 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.744, HP-UX Version +# Version 7.0NG.745, 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 52ca10f17b..7cb462f7e1 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.744, GNU/Linux +# Version 7.0NG.745, 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 36216608dc..7c614a4d94 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.744, GNU/Linux +# Version 7.0NG.745, 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 db64cb1514..e1fe45e718 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.744, NetBSD Version +# Version 7.0NG.745, 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 0f34c6623e..5855922016 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.744, Solaris Version +# Version 7.0NG.745, 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 4a71ee35b9..b148d3b547 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -54,8 +54,8 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.744'; -use constant AGENT_BUILD => '200415'; +use constant AGENT_VERSION => '7.0NG.745'; +use constant AGENT_BUILD => '200514'; # 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 22bca871b1..b2c1f7f2c6 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.744 -%define release 200415 +%define version 7.0NG.745 +%define release 200514 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 4bbbce0199..f98164a6e7 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.744 -%define release 200415 +%define version 7.0NG.745 +%define release 200514 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 5ebb27d919..d7c392ab7f 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.744" -PI_BUILD="200415" +PI_VERSION="7.0NG.745" +PI_BUILD="200514" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_plugins/Autodiscover services/autodiscover.py b/pandora_agents/unix/plugins/autodiscover similarity index 100% rename from pandora_plugins/Autodiscover services/autodiscover.py rename to pandora_agents/unix/plugins/autodiscover diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 774797aa4b..02d730f2dc 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.744 +# Version 7.0NG.745 # 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/build.sh b/pandora_agents/win32/build.sh index 2759a6b9cb..ae9f4cf6e8 100755 --- a/pandora_agents/win32/build.sh +++ b/pandora_agents/win32/build.sh @@ -3,13 +3,18 @@ # The installer will be placed in ./installer/output/. # InstallJammer must be installed and in the PATH. -ARCH=`uname -m` +# ARCH may be set by other build scripts. +if [ "$ARCH" == "" ]; then + ARCH=`uname -m` +fi + +# Set the target host. if [ "$ARCH" == "x86_64" ]; then HOST="x86_64-w64-mingw32" else HOST="i686-w64-mingw32" fi -#./autogen.sh && ./configure --host=$HOST && make clean && make && cp PandoraAgent.exe bin/ && installjammer --build installer/pandora.mpi +# Compile and update the Pandora FMS Agent binary. ./autogen.sh && ./configure --host=$HOST && make clean && make && cp PandoraAgent.exe bin/ diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 7cd5115d61..d3efecefc0 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.744} +{Pandora FMS Windows Agent v7.0NG.745} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200415} +{200514} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f87f3ff562..a357617c61 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.744(Build 200415)") +#define PANDORA_VERSION ("7.0NG.745(Build 200514)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 75104f3f81..b721133a68 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.744(Build 200415))" + VALUE "ProductVersion", "(7.0NG.745(Build 200514))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index af277c616a..5ea05f5601 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.744-200415 +Version: 7.0NG.745-200514 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 7a1abea1ab..b20c47b3a7 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.744-200415" +pandora_version="7.0NG.745-200514" package_pear=0 package_pandora=1 diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 6b70ae21e8..644e9aa564 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -188,9 +188,10 @@ function quickShell() } else if ($method == 'telnet') { // Telnet. $port = $config['gotty_telnet_port']; + $username = preg_replace('/[^a-zA-Z0-9\-\.]/', '', $username); $command_arguments = "var args = '?arg=-l ".$username; $command_arguments .= '&arg='.$address; - $command_arguments .= '&arg='.$method_port."';"; + $command_arguments .= '&arg='.$method_port."&arg=-E';"; } else { ui_print_error_message(__('Please use SSH or Telnet.')); return; diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index c0d8f0a9db..b18abb678d 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -1 +1,6 @@ -operation/servers/recon_view.php \ No newline at end of file +operation/servers/recon_view.php +operation/users/webchat.php +include/javascript/webchat.js +attachment/pandora_chat.log.json.txt +attachment/pandora_chat.user_list.json.txt +attachment/pandora_chat.global_counter.txt \ No newline at end of file diff --git a/pandora_console/extras/mr/38.sql b/pandora_console/extras/mr/38.sql index 248c1aeb52..901e0f89dc 100644 --- a/pandora_console/extras/mr/38.sql +++ b/pandora_console/extras/mr/38.sql @@ -1,5 +1,6 @@ START TRANSACTION; INSERT INTO `ttipo_modulo` VALUES (38,'web_server_status_code_string',9,'Remote HTTP module to check server status code','mod_web_data.png'); +ALTER TABLE trecon_task add column `rcmd_enabled` TINYINT(1) UNSIGNED DEFAULT 0 AFTER `wmi_enabled`; 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 895ba45a8a..ca4c9f02e0 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 @@ -1674,6 +1674,7 @@ ALTER TABLE trecon_task ADD `alias_as_name` int(2) unsigned default '0'; ALTER TABLE trecon_task ADD `snmp_enabled` int(2) unsigned default '0'; ALTER TABLE trecon_task ADD `vlan_enabled` int(2) unsigned default '0'; ALTER TABLE trecon_task ADD `wmi_enabled` tinyint(1) unsigned DEFAULT '0'; +ALTER TABLE trecon_task ADD `rcmd_enabled` tinyint(1) unsigned DEFAULT '0'; ALTER TABLE trecon_task ADD `auth_strings` text; ALTER TABLE trecon_task ADD `autoconfiguration_enabled` tinyint(1) unsigned default '0'; ALTER TABLE trecon_task ADD `summary` text; diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index b443926a63..8aa11ea4d9 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -81,13 +81,6 @@ if ($config['menu_type'] == 'classic') { } - // Chat messages. - $header_chat = "
Please check /etc/httpd/conf/httpd.conf to resolve this problem.'; + + // Get content file. + $file = file_get_contents('/etc/httpd/conf/httpd.conf'); + $file_lines = preg_split("#\r?\n#", $file, -1, PREG_SPLIT_NO_EMPTY); + $is_none = false; + + $i = 0; + foreach ($file_lines as $line) { + $i++; + + // Check Line and content. + if (preg_match('/ AllowOverride/', $line) && $i === 311) { + $result = explode(' ', $line); + if ($result[5] == 'None') { + $is_none = true; + $this->notify( + [ + 'type' => 'NOTIF.ALLOWOVERRIDE.MESSAGE', + 'title' => __('AllowOverride is disabled'), + 'message' => __($message), + 'url' => ui_get_full_url('index.php'), + ] + ); + } + } + } + + // Cleanup notifications if AllowOverride is All. + if (!$is_none) { + $this->cleanNotifications('NOTIF.ALLOWOVERRIDE.MESSAGE'); + } + + } + + } diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index fdc9d8683e..d9413521bb 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -557,7 +557,7 @@ class Tree $module['id_module_type'] = (int) $module['id_tipo_modulo']; $module['server_type'] = (int) $module['id_modulo']; $module['status'] = $module['estado']; - $module['value'] = $module['datos']; + $module['value'] = modules_get_agentmodule_data_for_humans($module); if (is_metaconsole()) { $module['serverID'] = $this->serverID; @@ -738,12 +738,10 @@ class Tree $agent['counters']['warning'], $agent['counters']['unknown'], $agent['counters']['total'], - $agent['counters']['not_init'] + $agent['counters']['not_init'], + $agent['counters']['alerts'] ); - // Alerts fired image - $agent['alertImageHTML'] = agents_tree_view_alert_img_ball($agent['counters']['alerts']); - // search module recalculate counters if (array_key_exists('state_normal', $agent)) { $agent['counters']['unknown'] = $agent['state_unknown']; diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 34244c20d8..19ee56deb5 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,8 +20,8 @@ /** * Pandora build version and version */ -$build_version = 'PC200415'; -$pandora_version = 'v7.0NG.744'; +$build_version = 'PC200514'; +$pandora_version = 'v7.0NG.745'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index e4f25be34d..eaea211d2a 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3947,7 +3947,7 @@ function get_copyright_notice() { $stored_name = enterprise_hook('enterprise_get_copyright_notice'); if (empty($stored_name) || $stored_name == ENTERPRISE_NOT_HOOK) { - return 'Ártica ST'; + return 'PandoraFMS.com'; } return $stored_name; diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 9eaed9c338..fdb12fac59 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -310,6 +310,10 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $ $subQuery = 'SELECT id_agente_modulo FROM tagente_modulo WHERE delete_pending = 0'; } + + // Filter by agents id. + $id_agents_list = implode(',', $id_agent); + $subQuery .= ' AND id_agente in ('.$id_agents_list.')'; } else if ($id_agent === false || empty($id_agent)) { if ($allModules) { $disabled = ''; @@ -2638,12 +2642,28 @@ function agents_tree_view_status_img($critical, $warning, $unknown, $total, $not // Returns the status ball image to display tree view -function agents_tree_view_status_img_ball($critical, $warning, $unknown, $total, $notinit) +function agents_tree_view_status_img_ball($critical, $warning, $unknown, $total, $notinit, $alerts) { if ($total == 0 || $total == $notinit) { return ui_print_status_image( STATUS_AGENT_NO_MONITORS_BALL, __('No Monitors'), + true, + false, + false, + // Use CSS shape instead of image. + true + ); + } + + if ($alerts > 0) { + return ui_print_status_image( + STATUS_ALERT_FIRED_BALL, + __('Alert fired on agent'), + true, + false, + false, + // Use CSS shape instead of image. true ); } @@ -2652,24 +2672,40 @@ function agents_tree_view_status_img_ball($critical, $warning, $unknown, $total, return ui_print_status_image( STATUS_AGENT_CRITICAL_BALL, __('At least one module in CRITICAL status'), + true, + false, + false, + // Use CSS shape instead of image. true ); } else if ($warning > 0) { return ui_print_status_image( STATUS_AGENT_WARNING_BALL, __('At least one module in WARNING status'), + true, + false, + false, + // Use CSS shape instead of image. true ); } else if ($unknown > 0) { return ui_print_status_image( STATUS_AGENT_DOWN_BALL, __('At least one module is in UKNOWN status'), + true, + false, + false, + // Use CSS shape instead of image. true ); } else { return ui_print_status_image( STATUS_AGENT_OK_BALL, __('All Monitors OK'), + true, + false, + false, + // Use CSS shape instead of image. true ); } diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 37ead3a465..76e10533aa 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -14294,7 +14294,7 @@ function api_get_agents_id_name_by_cluster_name($cluster_name, $trash1, $trash2, * @param $trash2 * @param string $returnType * Example: - * api.php?op=get&op2=agents_id_name_by_alias&return_type=json&apipass=1234&user=admin&pass=pandora&id=pandrora&id2=strict + * api.php?op=get&op2=agents_id_name_by_alias&return_type=json&apipass=1234&user=admin&pass=pandora&id=pandorafms&id2=strict */ function api_get_agents_id_name_by_alias($alias, $strict, $trash2, $returnType) { @@ -14307,9 +14307,9 @@ function api_get_agents_id_name_by_alias($alias, $strict, $trash2, $returnType) } if (is_metaconsole()) { - $all_agents = db_get_all_rows_sql("SELECT alias, id_agente, id_tagente,id_tmetaconsole_setup as 'id_server', server_name FROM tmetaconsole_agent WHERE $where_clause"); + $all_agents = db_get_all_rows_sql("SELECT alias, nombre, id_agente, id_tagente,id_tmetaconsole_setup as 'id_server', server_name FROM tmetaconsole_agent WHERE $where_clause"); } else { - $all_agents = db_get_all_rows_sql("SELECT alias, id_agente from tagente WHERE $where_clause"); + $all_agents = db_get_all_rows_sql("SELECT alias, nombre, id_agente from tagente WHERE $where_clause"); } if ($all_agents !== false) { @@ -15990,3 +15990,34 @@ function util_api_check_agent_and_print_error($id_agent, $returnType, $access='A return false; } + + +/** + * Function for get event id and node id, then we get in return the Metaconsole event ID. + * + * @param [string] $server_id id server (Node) + * @param [string] $console_event_id console Id node event in tmetaconsole_event + * @param [string] $trash2 don't use + * @param [string] $returnType + * + * Example + * api.php?op=get&op2=event_mcid&return_type=json&id=0&id2=0&apipass=1234&user=admin&pass=pandora + * + * @return void + */ +function api_get_event_mcid($server_id, $console_event_id, $trash2, $returnType) +{ + global $config; + + if (is_metaconsole()) { + $mc_event_id = db_get_all_rows_sql("SELECT id_evento FROM tmetaconsole_event WHERE id_source_event = $console_event_id AND server_id = $server_id "); + if ($mc_event_id !== false) { + returnData($returnType, ['type' => 'string', 'data' => $mc_event_id]); + } else { + returnError('id_not_found', 'string'); + } + } else { + returnError('forbidden', 'string'); + return; + } +} diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 76e06c77df..be1ecac492 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2088,10 +2088,10 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $ * * @return string HTML code if return parameter is true. */ -function html_print_textarea($name, $rows, $columns, $value='', $attributes='', $return=false, $class='') +function html_print_textarea($name, $rows, $columns, $value='', $attributes='', $return=false, $class='', $disable=false) { - $output = '