diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 216e3149e3..f1cc960a5c 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -122,6 +122,7 @@ module_min_critical 91 module_max_critical 0 module_end + # Number processes module_begin module_name Number processes diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 574029ce9f..31b1752a4e 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.775-240220 +Version: 7.0NG.775-240223 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 2b0d9e0fb4..501e690c23 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.775-240220" +pandora_version="7.0NG.775-240223" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 5a963ef6e5..81bdfc118f 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.775'; -use constant AGENT_BUILD => '240220'; +use constant AGENT_BUILD => '240223'; # 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 53d0db8510..bd06b0e4fc 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240220 +%define release 240223 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 3e053d1139..4818693de8 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240220 +%define release 240223 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 2d3be11084..6e304c3849 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240220 +%define release 240223 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 78495c142d..36ace10ab4 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240220 +%define release 240223 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index ae7336afaa..7d1bd6f6f7 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.775 -%define release 240220 +%define release 240223 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 4231f83ca3..2935baa16a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.775" -PI_BUILD="240220" +PI_BUILD="240223" 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 2ff61033c6..cdde841254 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -157,8 +157,8 @@ ehorus_conf "C:\Program Files\ehorus_agent\ehorus_agent.conf" module_begin module_name CPU Load module_type generic_data -module_wmiquery SELECT LoadPercentage FROM Win32_Processor -module_wmicolumn LoadPercentage +module_wmiquery SELECT PercentProcessorTime FROM Win32_PerfFormattedData_PerfOS_Processor where name like '_Total' +module_wmicolumn PercentProcessorTime module_max 100 module_min 0 module_description User CPU Usage (%) diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index dfdeecea3d..7ef6c38b49 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240220} +{240223} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0f7f128e46..05557e696c 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.775 Build 240220") +#define PANDORA_VERSION ("7.0NG.775 Build 240223") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index ff6ed8fa7e..9de5fc525c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.775(Build 240220))" + VALUE "ProductVersion", "(7.0NG.775(Build 240223))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index cab607fc18..40d89f5b8c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.775-240220 +Version: 7.0NG.775-240223 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 610e452556..b6e0dc13a3 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.775-240220" +pandora_version="7.0NG.775-240223" package_pear=0 package_pandora=1 diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 90c9527e55..0b43ce0bba 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -496,6 +496,10 @@ function mainAgentsModules() $agents = []; } + if (isset($agents_id) === false) { + $agents_id = ''; + } + $filter_agents = html_print_label_input_block( __('Agents'), html_print_select( diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 957d3a17a1..15c9e614ee 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -91,7 +91,7 @@ function mainModuleGroups() $module_group_search = get_parameter('module_group_search', ''); // Check the user's group permissions. - $user_groups = users_get_groups($config['user'], 'AR'); + $user_groups = users_get_groups($config['id_user'], 'AR'); $info = array_filter( $info, function ($v) use ($user_groups) { @@ -112,7 +112,7 @@ function mainModuleGroups() ); if (empty($info) === false) { - $groups_view = ($is_not_paginated) ? $info : array_slice( + $groups_view = (isset($is_not_paginated) === true) ? $info : array_slice( $info, $offset, $config['block_size'] @@ -374,6 +374,10 @@ function mainModuleGroups() '…' ); $j = 1; + if (isset($background_color) === false) { + $background_color = 'none'; + } + if (isset($array_data[$key])) { foreach ($value['gm'] as $k => $v) { if (isset($array_data[$key][$k])) { diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index a3f5872f84..d47d65ef56 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -273,6 +273,14 @@ function buildConnectionURL($method) { global $config; + if (isset($config['gotty_ssh_use_ssl']) === false) { + $config['gotty_ssh_use_ssl'] = ''; + } + + if (isset($config['gotty_telnet_use_ssl']) === false) { + $config['gotty_telnet_use_ssl'] = ''; + } + $address = (empty($config['gotty_addr']) === true) ? $_SERVER['SERVER_ADDR'] : $config['gotty_addr']; $use_ssl = ($method === 'ssh') ? $config['gotty_ssh_use_ssl'] : $config['gotty_telnet_use_ssl']; $protocol = ((bool) $use_ssl === true) ? 'https://' : 'http://'; @@ -353,6 +361,18 @@ function quickShellSettings() config_update_value('gotty_telnet_enabled', $gotty_telnet_enabled); } + if (isset($config['gotty_addr']) === false) { + $config['gotty_addr'] = ''; + } + + if (isset($config['gotty_ssh_use_ssl']) === false) { + $config['gotty_ssh_use_ssl'] = ''; + } + + if (isset($config['gotty_telnet_use_ssl']) === false) { + $config['gotty_telnet_use_ssl'] = ''; + } + if ($config['gotty_addr'] != $gotty_addr) { config_update_value('gotty_addr', $gotty_addr); } @@ -389,6 +409,25 @@ function quickShellSettings() $general_table->data = []; $general_table->style = []; $general_table->style[0] = 'width: 50%;'; + if (isset($config['gotty_addr']) === false) { + $config['gotty_addr'] = ''; + } + + if (isset($config['gotty_ssh_enabled']) === false) { + $config['gotty_ssh_enabled'] = ''; + } + + if (isset($config['gotty_ssh_use_ssl']) === false) { + $config['gotty_ssh_use_ssl'] = ''; + } + + if (isset($disable_agentaccess) === false) { + $disable_agentaccess = ''; + } + + if (isset($config['gotty_telnet_use_ssl']) === false) { + $config['gotty_telnet_use_ssl'] = ''; + } $general_table->data[0][] = html_print_label_input_block( __('Address'), diff --git a/pandora_console/extensions/users_connected.php b/pandora_console/extensions/users_connected.php index 4b76957344..712dcd014d 100644 --- a/pandora_console/extensions/users_connected.php +++ b/pandora_console/extensions/users_connected.php @@ -229,7 +229,7 @@ function users_extension_main_god($god=true) $data = []; $data[0] = ''.$row['id_user'].''; - $data[1] = $last_login_data['ip_origin']; + $data[1] = $last_login_data['ip_origen']; $data[2] = date($config['date_format'], $last_login_data['utimestamp']); $data[3] = date($config['date_format'], $row['last_connect']); array_push($table->data, $data); diff --git a/pandora_console/extras/mr/68.sql b/pandora_console/extras/mr/68.sql index 4d53485fe6..453a4ead7f 100644 --- a/pandora_console/extras/mr/68.sql +++ b/pandora_console/extras/mr/68.sql @@ -62,6 +62,8 @@ ADD COLUMN `id_agent_data` int not null default 0 AFTER `script_type`; ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ; ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`; +ALTER TABLE `tagente_modulo` ADD COLUMN `disabled_by_safe_mode` TINYINT UNSIGNED NOT NULL DEFAULT 0; + UPDATE `tncm_template` SET `vendors` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM vendors))), '"]'), `models` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM models))), '"]'); UPDATE `tncm_agent_data_template` SET `vendors` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM vendors))), '"]'), `models` = CONCAT('["', TRIM(BOTH '"' FROM TRIM(BOTH ']' FROM TRIM(BOTH '[' FROM models))), '"]'); diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index e2573bd859..5eee6a6669 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -161,6 +161,10 @@ echo sprintf('