diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2789487761..af43ac70be 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231130 +Version: 7.0NG.774-231207 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 3ead8c9748..d5c73049a1 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.774-231130" +pandora_version="7.0NG.774-231207" 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 f148c0491a..5b536bb64b 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.774'; -use constant AGENT_BUILD => '231130'; +use constant AGENT_BUILD => '231207'; # 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 7d8b52fac0..a3b2d8ec3d 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.774 -%define release 231130 +%define release 231207 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 d7acd083d4..3390a1408b 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.774 -%define release 231130 +%define release 231207 %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 a2f6f7f37b..41db54797d 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.774 -%define release 231130 +%define release 231207 %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 458f7a3b11..c7a34dfe60 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.774 -%define release 231130 +%define release 231207 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 602e20abbb..0dcd58b6b2 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.774 -%define release 231130 +%define release 231207 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 c470874b33..284c4a8eff 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231130" +PI_BUILD="231207" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b895417a9b..6c3def2e2b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231130} +{231207} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1c1fe1f556..e59fbc64d7 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.774 Build 231130") +#define PANDORA_VERSION ("7.0NG.774 Build 231207") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 61a0a56cd6..97dd2beb29 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.774(Build 231130))" + VALUE "ProductVersion", "(7.0NG.774(Build 231207))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a5181ad031..48095b1006 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231130 +Version: 7.0NG.774-231207 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 532bd8b166..44d1fd3ef3 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.774-231130" +pandora_version="7.0NG.774-231207" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index 234ec4e997..03db82db4e 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -1720,3 +1720,4 @@ include/functions_integriaims.php include/ajax/integria_incidents.ajax.php enterprise/operation/log/log_source.php enterprise/include/class/LogSource.class.php +include/chart_generator.php \ No newline at end of file diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql index b46c5eb194..214c28268a 100644 --- a/pandora_console/extras/mr/67.sql +++ b/pandora_console/extras/mr/67.sql @@ -1058,13 +1058,15 @@ UPDATE talert_actions SET field2='[PANDORA] Alert FIRED on _agent_ / _module_ / _timestamp_ / _data_' WHERE id=11; -- Delete table tagent_access -DROP TABLE tagent_access; +DROP TABLE IF EXISTS tagent_access; ALTER TABLE `tevent_rule` DROP COLUMN `user_comment`; ALTER TABLE `tevent_rule` DROP COLUMN `operator_user_comment`; ALTER TABLE treport_content ADD check_unknowns_graph tinyint DEFAULT 0 NULL; +ALTER TABLE `tevent_filter` +ADD COLUMN `regex` TEXT NULL AFTER `private_filter_user`; -- Update macros for plugin oracle UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.oracle'; @@ -1077,9 +1079,19 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, ` INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_clientPath_', 'custom', '', 0 FROM `trecon_task` WHERE `id_app` = @id_app; UPDATE `trecon_task` SET `setup_complete` = 1 WHERE `id_app` = @id_app; +-- Update lts updates +UPDATE tconfig SET value='1' WHERE token='lts_updates'; + ALTER TABLE `tdashboard` ADD COLUMN `date_range` TINYINT NOT NULL DEFAULT 0 AFTER `cells_slideshow`, ADD COLUMN `date_from` INT NOT NULL DEFAULT 0 AFTER `date_range`, ADD COLUMN `date_to` INT NOT NULL DEFAULT 0 AFTER `date_from`; +SELECT @generic_data := `id_tipo` FROM `ttipo_modulo` WHERE `nombre` = "generic_data"; +SELECT @generic_proc := `id_tipo` FROM `ttipo_modulo` WHERE `nombre` = "generic_proc"; +SELECT @async_data := `id_tipo` FROM `ttipo_modulo` WHERE `nombre` = "async_data"; +SELECT @async_proc := `id_tipo` FROM `ttipo_modulo` WHERE `nombre` = "async_proc"; +UPDATE `tagente_modulo` INNER JOIN `tservice` ON `tagente_modulo`.`custom_integer_1` = `tservice`.`id` SET `tagente_modulo`.`id_tipo_modulo` = @generic_data WHERE `tagente_modulo`.`id_tipo_modulo` = @async_data; +UPDATE `tagente_modulo` INNER JOIN `tservice` ON `tagente_modulo`.`custom_integer_1` = `tservice`.`id` SET `tagente_modulo`.`id_tipo_modulo` = @generic_proc WHERE `tagente_modulo`.`id_tipo_modulo` = @async_proc; + COMMIT; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 557b855e09..26bae75929 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -600,43 +600,176 @@ html_print_div( 'content' => html_print_table($tableAgent, true).$CodeQRTable, ] ); -/* - TODO REVIEW - $table_satellite = ''; - if ($remote_agent === true) { - // Satellite server selector. - $satellite_servers = db_get_all_rows_filter( - 'tserver', - ['server_type' => SERVER_TYPE_ENTERPRISE_SATELLITE], - [ - 'id_server', - 'name', - ] - ); - $satellite_names = []; - if (empty($satellite_servers) === false) { - foreach ($satellite_servers as $s_server) { - $satellite_names[$s_server['id_server']] = $s_server['name']; +// Basic Options. +$tableBasicAgent = new stdClass(); +$tableBasicAgent->class = 'filter-table-adv'; +$tableBasicAgent->data = []; +$disabledBasic = false; +$tableClassDisabled = ''; +if ($new_agent === true || $remote_agent === false || $has_remote_conf === false) { + $disabledBasic = true; + $tableClassDisabled = ' basic-options-disabled'; +} + +if (enterprise_installed()) { + // Get all plugins (BASIC OPTIONS). + $agent_plugin = new PandoraFMS\Agent($id_agente); + $plugins = $agent_plugin->getPlugins(); + // Check if some plugin was enabled/disabled in conf. + foreach ($plugins as $key => $row) { + if (preg_match('/pandora_hardening/', $row['raw']) === 1) { + if ($row['disabled'] === 1) { + $security_hardening = 0; + } else { + $security_hardening = 1; + } } - $table_satellite = '
'.__('Satellite').'
'; - $table_satellite .= '