Remove reference to tnetwork_matrix

This commit is contained in:
Félix Suárez 2023-06-04 16:12:29 -06:00
parent e2550c22e3
commit 593d197016
15 changed files with 0 additions and 132 deletions

View File

@ -35817,11 +35817,6 @@ msgstr ""
msgid "Max. days before delete old messages"
msgstr ""
#: ../../include/functions_config.php:864
#: ../../godmode/setup/performance.php:485
msgid "Max. days before delete old network matrix data"
msgstr ""
#: ../../include/functions_config.php:868
#: ../../godmode/setup/performance.php:599
msgid "Graph container - Max. Items"

View File

@ -545,21 +545,6 @@ $table->data[6][0] = html_print_label_input_block(
)
);
$table->data[6][1] = html_print_label_input_block(
__('Max. days before delete old network matrix data'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['delete_old_network_matrix']->max,
'name' => 'delete_old_network_matrix',
'value' => $config['delete_old_network_matrix'],
'return' => true,
'min' => $performance_variables_control['delete_old_network_matrix']->min,
]
)
);
if (enterprise_installed()) {
$table->data[7][0] = html_print_label_input_block(
__('Max. days before delete inventory data'),

View File

@ -583,7 +583,6 @@ class ConsoleSupervisor
'days_delete_unknown' => 'Max. days before unknown modules are deleted',
'days_delete_not_initialized' => 'Max. days before delete not initialized modules',
'days_autodisable_deletion' => 'Max. days before autodisabled agents are deleted',
'delete_old_network_matrix' => 'Max. days before delete old network matrix data',
'report_limit' => 'Item limit for real-time reports',
'event_view_hr' => 'Default hours for event view',
'big_operation_step_datos_purge' => 'Big Operation Step to purge old data',

View File

@ -940,10 +940,6 @@ function config_update_config()
$error_update[] = __('Max. days before delete old messages');
}
if (config_update_value('delete_old_network_matrix', get_parameter('delete_old_network_matrix'), true) === false) {
$error_update[] = __('Max. days before delete old network matrix data');
}
if (config_update_value('max_graph_container', get_parameter('max_graph_container'), true) === false) {
$error_update[] = __('Graph container - Max. Items');
}
@ -2197,10 +2193,6 @@ function config_process_config()
config_update_value('delete_old_messages', 21);
}
if (!isset($config['delete_old_network_matrix'])) {
config_update_value('delete_old_network_matrix', 10);
}
if (!isset($config['max_graph_container'])) {
config_update_value('max_graph_container', 10);
}
@ -2460,10 +2452,6 @@ function config_process_config()
'max' => 90,
'min' => 0,
],
'delete_old_network_matrix' => [
'max' => 30,
'min' => 1,
],
'report_limit' => [
'max' => 500,
'min' => 1,

View File

@ -36556,10 +36556,6 @@ msgstr "Màxim de dies abans de suprimir les dades de l'inventari"
msgid "Max. days before delete old messages"
msgstr "Màxims dies abans de suprimir missatges antics"
#: ../../include/functions_config.php:864 ../../godmode/setup/performance.php:485
msgid "Max. days before delete old network matrix data"
msgstr "Màxim de dies abans de suprimir les dades antigues de la matriu de xarxa"
#: ../../include/functions_config.php:868 ../../godmode/setup/performance.php:599
msgid "Graph container - Max. Items"
msgstr "Contenidor de gràfics - Màxims. Elements"

View File

@ -33677,11 +33677,6 @@ msgstr "Compact interpolation in hours (1 = fine / 20 = bad)"
msgid "Max. days before delete old messages"
msgstr ""
#: ../../godmode/setup/performance.php:511
#: ../../include/functions_config.php:829
msgid "Max. days before delete old network matrix data"
msgstr ""
#: ../../godmode/setup/performance.php:531
msgid "Item limit for realtime reports"
msgstr "Item limit for real-time reports"

View File

@ -40018,10 +40018,6 @@ msgstr "Interpolación de la compactación en horas (1 bueno - 20 malo)"
msgid "Max. days before delete old messages"
msgstr "Núm. máx. de días antes de borrar mensajes antiguos"
#: ../../godmode/setup/performance.php:549 ../../include/functions_config.php:932
msgid "Max. days before delete old network matrix data"
msgstr "Núm. máx. de días antes de borrar datos de matriz antiguos"
#: ../../godmode/setup/performance.php:565 ../../include/functions_config.php:923
msgid "Max. days before delete inventory data"
msgstr "Nº de días máximo antes del borrado de datos de inventario"

View File

@ -40145,10 +40145,6 @@ msgstr "Interpolation de compression en heures (1 Optimale-20 Mauvaise)"
msgid "Max. days before delete old messages"
msgstr "Max. jours avant de supprimer les anciens messages"
#: ../../godmode/setup/performance.php:549 ../../include/functions_config.php:932
msgid "Max. days before delete old network matrix data"
msgstr "Max. jours avant de supprimer les anciennes données de la matrice réseau"
#: ../../godmode/setup/performance.php:565 ../../include/functions_config.php:923
msgid "Max. days before delete inventory data"
msgstr "Nombre de jours maximum avant la suppression de données d'inventaire"

View File

@ -39282,11 +39282,6 @@ msgstr ""
msgid "Max. days before delete old messages"
msgstr ""
#: ../../godmode/setup/performance.php:549
#: ../../include/functions_config.php:932
msgid "Max. days before delete old network matrix data"
msgstr ""
#: ../../godmode/setup/performance.php:565
#: ../../include/functions_config.php:923
msgid "Max. days before delete inventory data"

View File

@ -39389,10 +39389,6 @@ msgstr "データ縮小時の丸め込み単位時間 (1〜20)"
msgid "Max. days before delete old messages"
msgstr "古いメッセージの保持日数"
#: ../../godmode/setup/performance.php:549 ../../include/functions_config.php:932
msgid "Max. days before delete old network matrix data"
msgstr "ネットワークマトリックスデータ保持日数"
#: ../../godmode/setup/performance.php:565 ../../include/functions_config.php:923
msgid "Max. days before delete inventory data"
msgstr "インベントリデータの保持日数"

View File

@ -36535,10 +36535,6 @@ msgstr "Максимальное количество дней до удален
msgid "Max. days before delete old messages"
msgstr "Максимальное количество дней до удаления старых сообщений"
#: ../../include/functions_config.php:864 ../../godmode/setup/performance.php:485
msgid "Max. days before delete old network matrix data"
msgstr "Максимальное количество дней до удаления старых данных сетевой матрицы"
#: ../../include/functions_config.php:868 ../../godmode/setup/performance.php:599
msgid "Graph container - Max. Items"
msgstr "Графический контейнер - Макс. Элементы"

View File

@ -35863,10 +35863,6 @@ msgstr "删除库存数据前的最大日期"
msgid "Max. days before delete old messages"
msgstr "删除旧邮件前的最大日期"
#: ../../include/functions_config.php:864 ../../godmode/setup/performance.php:485
msgid "Max. days before delete old network matrix data"
msgstr "删除旧网络矩阵数据前的最大日期"
#: ../../include/functions_config.php:868 ../../godmode/setup/performance.php:599
msgid "Graph container - Max. Items"
msgstr "图形容器 - 最大项目"

View File

@ -3742,20 +3742,6 @@ CREATE TABLE IF NOT EXISTS `tagent_custom_fields_filter` (
PRIMARY KEY(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- -----------------------------------------------------
-- Table `tnetwork_matrix`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnetwork_matrix` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`source` VARCHAR(60) DEFAULT '',
`destination` VARCHAR(60) DEFAULT '',
`utimestamp` BIGINT DEFAULT 0,
`bytes` INT UNSIGNED DEFAULT 0,
`pkts` INT UNSIGNED DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE (`source`, `destination`, `utimestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4 ;
-- ---------------------------------------------------------------------
-- Table `user_task`
-- ---------------------------------------------------------------------

View File

@ -313,8 +313,6 @@ sub data_consumer ($$) {
enterprise_hook('process_xml_connections', [$self->getConfig (), $file_name, $xml_data, $self->getDBH ()]);
} elsif (defined($xml_data->{'ipam_source'})) {
enterprise_hook('process_xml_ipam', [$self->getConfig (), $file_name, $xml_data, $self->getDBH ()]);
} elsif (defined($xml_data->{'network_matrix'})){
process_xml_matrix_network( $self->getConfig(), $xml_data, $self->getDBH());
} else {
process_xml_data ($self->getConfig (), $file_name, $xml_data, $self->getServerID (), $self->getDBH ());
}
@ -1130,45 +1128,6 @@ sub process_events_dataserver {
return;
}
##########################################################################
# Process events in the XML.
##########################################################################
sub process_xml_matrix_network {
my ($pa_config, $data, $dbh) = @_;
my $utimestamp = $data->{'network_matrix'}->[0]->{'utimestamp'};
my $content = $data->{'network_matrix'}->[0]->{'content'};
return unless defined($utimestamp) && defined($content);
# Try to decode the base64 inside
my $matrix_info;
eval {
$matrix_info = decode_json(decode_base64($content));
};
if ($@) {
logger($pa_config, "Error processing base64 matrix data '$content'.", 5);
return;
}
foreach my $source (keys %$matrix_info) {
foreach my $destination (keys %{$matrix_info->{$source}}) {
my $matrix_single_data = $matrix_info->{$source}->{$destination};
$matrix_single_data->{'source'} = $source;
$matrix_single_data->{'destination'} = $destination;
$matrix_single_data->{'utimestamp'} = $utimestamp;
eval {
db_process_insert($dbh, 'id', 'tnetwork_matrix', $matrix_single_data);
};
if ($@) {
logger($pa_config, "Error inserted matrix data. Source: $source, destination: $destination, utimestamp: $utimestamp.", 5);
}
}
}
return;
}
##########################################################################
# Get a lock on the given agent. Return 1 on success, 0 otherwise.
##########################################################################

View File

@ -408,14 +408,6 @@ sub pandora_purgedb ($$$) {
log_message ('PURGE', 'Deleting old tgraph_source data.');
db_do ($dbh,"DELETE FROM tgraph_source WHERE id_graph NOT IN (SELECT id_graph FROM tgraph)");
# Delete network traffic old data.
log_message ('PURGE', 'Deleting old network matrix data.');
if ($conf->{'_delete_old_network_matrix'} > 0) {
my $matrix_limit = time() - 86400 * $conf->{'_delete_old_network_matrix'};
db_do ($dbh, "DELETE FROM tnetwork_matrix WHERE utimestamp < ?", $matrix_limit);
}
# Delete old messages
log_message ('PURGE', "Deleting old messages.");
if ($conf->{'_delete_old_messages'} > 0) {
@ -599,7 +591,6 @@ sub pandoradb_load_history_conf($) {
$options{'_days_autodisable_deletion'} = 0 unless defined ($options{'_days_autodisable_deletion'});
$options{'_num_past_special_days'} = 0 unless defined($options{'_num_past_special_days'});
$options{'_delete_old_network_matrix'} = 0 unless defined($options{'_delete_old_network_matrix'});
$options{'_delete_old_messages'} = 0 unless defined($options{'_delete_old_messages'});
$options{'_netflow_max_lifetime'} = 0 unless defined($options{'_netflow_max_lifetime'});
$options{'claim_back_snmp_modules'} = 0 unless defined($options{'claim_back_snmp_modules'});
@ -695,7 +686,6 @@ sub pandora_load_config_pdb ($) {
$conf->{'_delete_notinit'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_notinit'");
$conf->{'_inventory_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'inventory_purge'");
$conf->{'_delete_old_messages'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_old_messages'");
$conf->{'_delete_old_network_matrix'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_old_network_matrix'");
$conf->{'_enterprise_installed'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'enterprise_installed'");
$conf->{'_metaconsole'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'metaconsole'");
$conf->{'_netflow_max_lifetime'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_max_lifetime'");