23.06实体关系建表
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
CREATE TABLE cyber_narrator_galaxy.cn_entity_relation_local on cluster ck_cluster
|
CREATE TABLE if not exists cyber_narrator_galaxy.cn_entity_relation_local on cluster ck_cluster
|
||||||
(
|
(
|
||||||
app_name String,
|
app_name String,
|
||||||
fqdn String,
|
fqdn String,
|
||||||
@@ -11,10 +11,9 @@
|
|||||||
update_time Int64
|
update_time Int64
|
||||||
)
|
)
|
||||||
ENGINE = MergeTree
|
ENGINE = MergeTree
|
||||||
ORDER BY (common_server_ip,
|
ORDER BY (ip,
|
||||||
common_server_port,
|
fqdn,
|
||||||
common_app_label,
|
app_name)
|
||||||
domain)
|
|
||||||
TTL toDateTime(update_time) + toIntervalSecond(2592000),
|
TTL toDateTime(update_time) + toIntervalSecond(2592000),
|
||||||
toDateTime(update_time) + toIntervalSecond(1) GROUP BY ip,
|
toDateTime(update_time) + toIntervalSecond(1) GROUP BY ip,
|
||||||
fqdn,
|
fqdn,
|
||||||
@@ -59,7 +58,7 @@ ENGINE = Distributed('ck_cluster',
|
|||||||
rand());
|
rand());
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE cyber_narrator_galaxy.cn_dynamic_info_relation_local on cluster ck_cluster
|
CREATE TABLE if not exists cyber_narrator_galaxy.cn_dynamic_info_relation_local on cluster ck_cluster
|
||||||
(
|
(
|
||||||
ip String,
|
ip String,
|
||||||
l7_protocol String,
|
l7_protocol String,
|
||||||
@@ -145,4 +144,3 @@ SELECT
|
|||||||
FROM cyber_narrator_galaxy.session_record_cn_local c1
|
FROM cyber_narrator_galaxy.session_record_cn_local c1
|
||||||
where common_l4_protocol ='IPv4_TCP' OR common_server_port in(53,443)
|
where common_l4_protocol ='IPv4_TCP' OR common_server_port in(53,443)
|
||||||
GROUP BY ip,l7_protocol,port;
|
GROUP BY ip,l7_protocol,port;
|
||||||
|
|
||||||
Reference in New Issue
Block a user