From a59f29f557f8f2f112bf896a41735e1ac8edb0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Thu, 8 Jun 2023 10:14:54 -0600 Subject: [PATCH 1/3] Remove transactional_agent references --- pandora_console/pandoradb.sql | 2 -- pandora_server/lib/PandoraFMS/Core.pm | 20 -------------------- pandora_server/lib/PandoraFMS/DataServer.pm | 12 ------------ 3 files changed, 34 deletions(-) diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 8706e37fed..5083e060a6 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -85,7 +85,6 @@ CREATE TABLE IF NOT EXISTS `tagente` ( `update_alert_count` TINYINT NOT NULL DEFAULT 0, `update_secondary_groups` TINYINT NOT NULL DEFAULT 0, `alias` VARCHAR(600) NOT NULL DEFAULT '', - `transactional_agent` TINYINT NOT NULL DEFAULT 0, `alias_as_name` TINYINT NOT NULL DEFAULT 0, `safe_mode_module` INT UNSIGNED NOT NULL DEFAULT 0, `cps` INT NOT NULL DEFAULT 0, @@ -3431,7 +3430,6 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` ( `update_module_count` TINYINT NOT NULL DEFAULT 0, `update_alert_count` TINYINT NOT NULL DEFAULT 0, `update_secondary_groups` TINYINT NOT NULL DEFAULT 0, - `transactional_agent` TINYINT NOT NULL DEFAULT 0, `alias` VARCHAR(600) NOT NULL DEFAULT '', `alias_as_name` TINYINT NOT NULL DEFAULT 0, `safe_mode_module` INT UNSIGNED NOT NULL DEFAULT 0, diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 06deaa4331..5b5e60a1f9 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -257,7 +257,6 @@ our @EXPORT = qw( pandora_update_server pandora_update_table_from_hash pandora_update_template_module - pandora_mark_transactional_agent pandora_group_statistics pandora_server_statistics pandora_self_monitoring @@ -3280,25 +3279,6 @@ sub pandora_update_agent ($$$$$$$;$$$) { db_do ($dbh, "UPDATE tagente SET $set WHERE id_agente = ?", @{$values}, $agent_id); } - -########################################################################## -=head2 C<< pandora_mark_transactional_agent (I<$id_agente>) >> - -Set an agent as transactional agent - -=cut -########################################################################## -sub pandora_mark_transactional_agent($$) { - my ($dbh, $id_agente) = @_; - - if ( (!(defined($id_agente))) || (!(defined($dbh))) ) { - return; - } - - db_do ($dbh, "UPDATE tagente SET transactional_agent=1 WHERE id_agente = ?", $id_agente); -} - - ########################################################################## =head2 C<< pandora_update_gis_data (I<$pa_config>, I<$dbh>, I<$agent_id>, I<$longitude>, I<$latitude>, I<$altitude>) >> diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index ac4364dca1..f3bc720a34 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -759,13 +759,6 @@ sub process_module_data ($$$$$$$$$$) { # Name XML tag and column name don't match $module_conf->{'nombre'} = safe_input($module_name); - # Check if module is 'Transactional subsystem status' - my $enable_transactional_subsystem = 0; - if ($module_conf->{'name'} eq "Transactional subsystem status") { - $enable_transactional_subsystem = 1; - } - delete $module_conf->{'name'}; - # Calculate the module interval in seconds if (defined($module_conf->{'cron_interval'})) { $module_conf->{'module_interval'} = $module_conf->{'cron_interval'}; @@ -826,11 +819,6 @@ sub process_module_data ($$$$$$$$$$) { delete $module_conf->{'module_group'}; } - if ($enable_transactional_subsystem == 1) { - # Defines current agent as transactional agent - pandora_mark_transactional_agent($dbh, $agent->{'id_agente'}); - } - $module_conf->{'id_modulo'} = 1; $module_conf->{'id_agente'} = $agent->{'id_agente'}; From 8e92f612fdf59c89be9e8bba25d3788d19e17c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Sun, 11 Jun 2023 14:06:29 -0600 Subject: [PATCH 2/3] Restore module_conf name --- pandora_server/lib/PandoraFMS/DataServer.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index f3bc720a34..7139f28a53 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -759,6 +759,8 @@ sub process_module_data ($$$$$$$$$$) { # Name XML tag and column name don't match $module_conf->{'nombre'} = safe_input($module_name); + delete $module_conf->{'name'}; + # Calculate the module interval in seconds if (defined($module_conf->{'cron_interval'})) { $module_conf->{'module_interval'} = $module_conf->{'cron_interval'}; From bccea94864b4a08a7a1e37fc7711e7b16f81bc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Fri, 14 Jul 2023 08:19:25 -0600 Subject: [PATCH 3/3] Removing transactionalserver from core --- pandora_server/lib/PandoraFMS/Core.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 5b5e60a1f9..5572a7410a 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -306,7 +306,6 @@ our @ServerTypes = qw ( icmpserver snmpserver satelliteserver - transactionalserver mfserver syncserver wuxserver