diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index ad0469b3dd..477d2600a9 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.702, AIX version +# Version 7.0NG.703, 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 4204520453..de6843c02b 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.702, FreeBSD Version +# Version 7.0NG.703, 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 f0960f0e88..46189c2461 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.702, HP-UX Version +# Version 7.0NG.703, 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 a2c0d2d4f8..f6d2067115 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.702, GNU/Linux +# Version 7.0NG.703, 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 975cb5f461..213ba7e160 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.702, GNU/Linux +# Version 7.0NG.703, 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 4f0e52daf7..b3359bff68 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.702, Solaris Version +# Version 7.0NG.703, 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 b3dc383872..ccf7805593 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.702 +# Version 7.0NG.703 # 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 36d55bd170..a3d4981a96 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.702, AIX version +# Version 7.0NG.703, 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 8f0cbac3fb..10fbdb58f9 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.702 +# Version 7.0NG.703 # 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 2e28fccb23..7a14c77ef7 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.702, HPUX Version +# Version 7.0NG.703, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index c6e5935841..50bd5d78fd 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.702 +# Version 7.0NG.703 # 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 4b83ae44e6..9a9fb626a9 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.702 +# Version 7.0NG.703 # 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 c8ecb194c5..6326cd48ac 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.702 +# Version 7.0NG.703 # 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 b865c1cecd..566d07d0e5 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.702, Solaris version +# Version 7.0NG.703, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 213f2dad81..89f3c71d14 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.702, AIX version +# Version 7.0NG.703, 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 5942e7a000..0d9d3d96e6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.702-170508 +Version: 7.0NG.703 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 424dd4f3cb..df9e85f195 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.702-170508" +pandora_version="7.0NG.703" 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 99c55032b9..7028f11a9b 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.702, GNU/Linux +# Version 7.0NG.703, 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 fa5133542e..6e44217cd9 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.702, FreeBSD Version +# Version 7.0NG.703, 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 b5b8b5ac89..231aab8fb7 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.702, HP-UX Version +# Version 7.0NG.703, 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 2193b79020..68c33feadb 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.702, GNU/Linux +# Version 7.0NG.703, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com @@ -46,6 +46,12 @@ agent_name_cmd __rand__ #Parent agent_name #parent_agent_name caprica +# By default, agent takes machine alias +#agent_alias + +# To define agent alias by specific command, define 'agent_alias_cmd'. +#agent_alias_cmd + # Agent description #description This is a demo agent for Linux diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 394324a119..c6bf2175fb 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.702, GNU/Linux +# Version 7.0NG.703, 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 c95d19f363..9dec043a34 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.702, NetBSD Version +# Version 7.0NG.703, 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 53f3ac80a7..8a839dd648 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.702, Solaris Version +# Version 7.0NG.703, 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 e9490ca82a..bc1f478922 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -40,8 +40,8 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.702'; -use constant AGENT_BUILD => '170508'; +use constant AGENT_VERSION => '7.0NG.703'; +use constant AGENT_BUILD => '170517'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; @@ -135,9 +135,10 @@ my %DefaultConf = ( 'interval' => 300, 'debug' => 0, 'agent_name' => '', - 'agent_alias' => hostname(), + 'agent_alias' => '', 'ehorus_conf' => undef, 'agent_name_cmd' => '', + 'agent_alias_cmd' => '', 'description' => '', 'group' => '', 'group_id' => undef, @@ -802,6 +803,23 @@ sub read_config (;$) { # Module, plugin and collection definitions parse_conf_modules(\@file); + + # If agent_alias_cmd is defined, agent_alias is set by command result. + if ($Conf{'agent_alias'} eq '') { + if ($Conf{'agent_alias_cmd'} ne '') { + my $result = `$Conf{'agent_alias_cmd'}`; + # Use only the first line. + my ($temp_agent_alias, $remain2) = split(/\n/, $result); + chomp ($temp_agent_alias); + + # Remove white spaces of the first and last. + $temp_agent_alias =~ s/^ *(.*?) *$/$1/; + + $Conf{'agent_alias'} = $temp_agent_alias if ($temp_agent_alias ne ''); + } else { + $Conf{'agent_alias'} = hostname(); + } + } # If agent_name_cmd is defined, agent_name is set by command result. if ($Conf{'agent_name'} eq '') { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index dbe1bada36..905b1437b1 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.702 -%define release 170508 +%define version 7.0NG.703 +%define release 1 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 664c5e77da..76d65892d8 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.702 -%define release 170508 +%define version 7.0NG.703 +%define release 1 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 340d56246f..5fc9793446 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.702" -PI_BUILD="170508" +PI_VERSION="7.0NG.703" +PI_BUILD="170517" 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 541132de4f..191dffec26 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-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.702 +# Version 7.0NG.703 # 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 843f1fd5b2..425474855d 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.702} +{Pandora FMS Windows Agent v7.0NG.703} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170508} +{170517} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 514551fdd6..190922cdf7 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.702(Build 170508)") +#define PANDORA_VERSION ("7.0NG.703(Build 170517)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/pandora_agent_conf.cc b/pandora_agents/win32/pandora_agent_conf.cc index 83675cdde6..94617243d5 100644 --- a/pandora_agents/win32/pandora_agent_conf.cc +++ b/pandora_agents/win32/pandora_agent_conf.cc @@ -228,6 +228,15 @@ Pandora::Pandora_Agent_Conf::setFile (string *all_conf){ key_values->push_back (kv); continue; } + + /*Check if is a agent_alias_cmd"*/ + pos = buffer.find("agent_alias_cmd"); + if (pos != string::npos){ + Key_Value kv; + kv.parseLineByPosition(buffer, 15); + key_values->push_back (kv); + continue; + } /*Check if is a collection*/ pos = buffer.find("file_collection"); diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index 45c2189385..a7c1105975 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -257,7 +257,36 @@ Pandora_Windows_Service::pandora_init () { // Read modules this->modules = new Pandora_Module_List (conf_file); delete []all_conf; - + + // Get the agent alias. + agent_alias = conf->getValue ("agent_alias"); + if (agent_alias == "") { + agent_alias_cmd = conf->getValue ("agent_alias_cmd"); + if (agent_alias_cmd != "") { + agent_alias_cmd = "cmd.exe /c \"" + agent_alias_cmd + "\""; + static string temp_agent_alias = getAgentNameFromCmdExec(agent_alias_cmd); + + // Delete new line and carriage return. + pos = temp_agent_alias.find("\n"); + if(pos != string::npos) { + temp_agent_alias.erase(pos, temp_agent_alias.size () - pos); + } + pos = temp_agent_alias.find("\r"); + if(pos != string::npos) { + temp_agent_alias.erase(pos, temp_agent_alias.size () - pos); + } + + // Remove leading and trailing white spaces. + temp_agent_alias = trim(temp_agent_alias); + if (temp_agent_alias != "") { + agent_alias = temp_agent_alias; + } + } else { + agent_alias = Pandora_Windows_Info::getSystemName (); + } + } + this->conf->setValue("agent_alias", agent_alias); + // Get the agent name. agent_name = conf->getValue ("agent_name"); if (agent_name == "") { @@ -299,13 +328,6 @@ Pandora_Windows_Service::pandora_init () { this->conf->setValue("agent_name", agent_name); } - // Get the agent alias. - agent_alias = conf->getValue ("agent_alias"); - if (agent_alias == "") { - agent_alias = Pandora_Windows_Info::getSystemName (); - this->conf->setValue("agent_alias", agent_alias); - } - pandora_agent = "PANDORA_AGENT=" + agent_name; putenv(pandora_agent.c_str()); diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c9f42ff0fe..75bf082ac9 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.702(Build 170508))" + VALUE "ProductVersion", "(7.0NG.703(Build 170517))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 20084c3810..e0f72b3b6e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.702-170508 +Version: 7.0NG.703 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 9c0401ab1f..40d4ff8e82 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.702-170508" +pandora_version="7.0NG.703" package_pear=0 package_pandora=1 diff --git a/pandora_console/general/alert_enterprise.php b/pandora_console/general/alert_enterprise.php index 3cd1b0b93d..441eeb9595 100644 --- a/pandora_console/general/alert_enterprise.php +++ b/pandora_console/general/alert_enterprise.php @@ -15,7 +15,7 @@ if(!enterprise_installed()){ $open=true; } -$tipo = $_GET['message']; +$tipo = $_POST['message']; echo "
diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 43424f69e5..693d3dca56 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -83,12 +83,19 @@ echo '
'; echo 'pandora_console'; } echo '
'; - echo '
'; + + echo '
'; + + echo '
'; echo '
'; diff --git a/pandora_console/general/pandora_help.php b/pandora_console/general/pandora_help.php index 691013ad8d..2fe5a22700 100644 --- a/pandora_console/general/pandora_help.php +++ b/pandora_console/general/pandora_help.php @@ -31,13 +31,14 @@ require_once ("../include/functions_html.php"); 0), array('id_agente' => $enable_agent)); + $alias = agents_get_alias($enable_agent); if ($result) { // Update the agent from the metaconsole cache @@ -106,10 +107,10 @@ if ($enable_agent) { $values = array('disabled' => 0); enterprise_hook ('agent_update_from_cache', array($enable_agent, $values)); - db_pandora_audit("Agent management", 'Enable ' . $enable_agent); + db_pandora_audit("Agent management", 'Enable ' . $alias); } else { - db_pandora_audit("Agent management", 'Fail to enable ' . $enable_agent); + db_pandora_audit("Agent management", 'Fail to enable ' . $alias); } ui_print_result_message ($result, @@ -118,6 +119,7 @@ if ($enable_agent) { if ($disable_agent) { $result = db_process_sql_update('tagente', array('disabled' => 1), array('id_agente' => $disable_agent)); + $alias = agents_get_alias($disable_agent); if ($result) { // Update the agent from the metaconsole cache @@ -125,10 +127,10 @@ if ($disable_agent) { $values = array('disabled' => 1); enterprise_hook ('agent_update_from_cache', array($disable_agent, $values)); - db_pandora_audit("Agent management", 'Disable ' . $disable_agent); + db_pandora_audit("Agent management", 'Disable ' . $alias); } else { - db_pandora_audit("Agent management", 'Fail to disable ' . $disable_agent); + db_pandora_audit("Agent management", 'Fail to disable ' . $alias); } ui_print_result_message ($result, diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 561266d6df..dbb6db2da0 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -882,6 +882,9 @@ $(document).ready (function () { $('#dynamic_interval_select').change (function() { disabled_status(disabledBecauseInPolicy); }); + $('#dynamic_interval').change (function() { + disabled_status(disabledBecauseInPolicy); + }); disabled_two_tailed(disabledBecauseInPolicy); $('#checkbox-dynamic_two_tailed').change (function() { @@ -929,7 +932,7 @@ $(document).ready (function () { //readonly and add class input function disabled_status (disabledBecauseInPolicy) { - if($('#dynamic_interval_select').val() != 0){ + if($('#dynamic_interval_select').val() != 0 && $('#dynamic_interval').val() != 0){ $('#text-min_warning').prop('readonly', true); $('#text-min_warning').addClass('readonly'); $('#text-max_warning').prop('readonly', true); diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index b1311a7846..c797b268a3 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -633,8 +633,6 @@ echo ''; if ($id_downtime > 0) { echo ""; - // Show available agents to include into downtime - echo '

' . __('Available agents') . ':

'; $filter_group = (int) get_parameter("filter_group", 0); @@ -707,7 +705,8 @@ if ($id_downtime > 0) { echo "

"; html_print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false); echo ""; - + // Show available agents to include into downtime + echo '

' . __('Available agents') . ':

'; echo "
"; echo html_print_select ($agents, "id_agents[]", -1, '', _("Any"), -2, false, true, true, '', false, 'width: 180px;'); diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index ff0605390a..cda35892a4 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -129,7 +129,8 @@ if (!$delete_template) { alerts_meta_print_header (); } else { - ui_print_page_header (__('Alerts')." » ". __('Alert templates'), "images/gm_alerts.png", false, "alerts_config", true); + //~ ui_print_page_header (__('Alerts')." » ". __('Alert templates'), "images/gm_alerts.png", false, "alerts_config", true); + ui_print_page_header (__('Alerts')." » ". __('Alert templates'), "images/gm_alerts.png", false, "", true); } } diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 7157037af3..bef56c026c 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -265,7 +265,7 @@ $(document).ready (function () { name: "id", value: this.value}); - jQuery.get (, + jQuery.post (, values, function (data, status) { original_command = js_html_entity_decode (data["command"]); @@ -274,6 +274,7 @@ $(document).ready (function () { render_command_description(command_description); var max_fields = parseInt(''); + for (i = 1; i <= max_fields; i++) { var old_value = ''; var old_recovery_value = ''; diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index 206a0fb2b8..d2cc13a702 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -59,9 +59,12 @@ if ($a_template !== false) { alerts_meta_print_header(); } else { + //~ ui_print_page_header (__('Alerts') . + //~ ' » ' . __('Configure alert template'), "", + //~ false, "alerts_config", true); ui_print_page_header (__('Alerts') . ' » ' . __('Configure alert template'), "", - false, "alerts_config", true); + false, "", true); } } else { diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index 91f2f032eb..f15054c45f 100755 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -1394,10 +1394,7 @@ $(document).ready (function () { name: "get_recovery_fields", value: "0" }); - jQuery.get ( - , + jQuery.post (, values, function (data, status) { var max_fields = parseInt(''); diff --git a/pandora_console/godmode/update_manager/update_manager.offline.php b/pandora_console/godmode/update_manager/update_manager.offline.php index c6843034f3..f9ae0cd9e0 100644 --- a/pandora_console/godmode/update_manager/update_manager.offline.php +++ b/pandora_console/godmode/update_manager/update_manager.offline.php @@ -41,7 +41,7 @@ $baseurl = ui_get_full_url(false, false, false, false); var click_on_the_file_below_to_begin = "\n"; var updating = "\n"; var package_updated_successfully = "\n"; - var if_there_are_any_database_change = "\n"; + var if_there_are_any_database_change = "\n"; var mr_available = "\n"; var package_available = "\n"; var mr_not_accepted = "\n"; @@ -54,8 +54,9 @@ $baseurl = ui_get_full_url(false, false, false, false); var package_success = "\n"; var package_error = "\n"; var bad_mr_file = "\n"; - var text1_mr_file = "\n"; - var text2_mr_file = "\n"; + var mr_available_header = "\n"; + var text1_mr_file = "\n"; + var text2_mr_file = "\n"; var text3_mr_file = "\n"; var text4_mr_file = "\n"; var text1_package_file = "\n"; diff --git a/pandora_console/godmode/update_manager/update_manager.online.php b/pandora_console/godmode/update_manager/update_manager.online.php index 747b6a0ece..666709604f 100644 --- a/pandora_console/godmode/update_manager/update_manager.online.php +++ b/pandora_console/godmode/update_manager/update_manager.online.php @@ -82,7 +82,7 @@ echo ""; echo ""; echo "

"; -echo "
" . __('The last version of package installed is:') . "

"; +echo "
" . __('The latest version of package installed is:') . "

"; echo "
" . $current_package . "
"; echo "