Добавил скрипты сборки, SQL-файлы и конфигурации

This commit is contained in:
2024-02-22 20:40:18 +03:00
parent dcbf32b1a4
commit 555a7a50d8
19 changed files with 1460 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
update statistics set value = 5 where name = 'anomaly';
update statistics set value = 21 where name = 'not anomaly';
update statistics set value = 26 where name = 'total';
insert into anomaly_logs (cluster_id, data) values (0, 'filesystem error'), (0, 'network error');
+26
View File
@@ -0,0 +1,26 @@
create database log_analysis;
create table statistics(
name varchar(64),
value int,
primary key (name)
);
insert into statistics (name, value) values ('total', 0), ('anomaly', 0), ('not anomaly', 0), ('undefined', 0);
create table logs_clusters(
id int,
name text,
description text,
recommendation text,
primary key (id)
);
insert into logs_clusters (id, name, description, recommendation) values (0, 'unknown', '', '');
create table anomaly_logs(
id serial,
cluster_id int references logs_clusters(id),
data text,
primary key (id)
);