TSG-20988 ck新增Traffic Sketch Metric数据表
This commit is contained in:
@@ -3241,3 +3241,100 @@ ENGINE = Distributed('ck_cluster',
|
|||||||
'datapath_telemetry_record_local',
|
'datapath_telemetry_record_local',
|
||||||
rand());
|
rand());
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.traffic_sketch_metric_local on cluster ck_cluster
|
||||||
|
(
|
||||||
|
log_id UInt64,
|
||||||
|
recv_time Int64,
|
||||||
|
vsys_id Int64,
|
||||||
|
device_id String,
|
||||||
|
device_group String,
|
||||||
|
data_center String,
|
||||||
|
direction String,
|
||||||
|
ip_protocol String,
|
||||||
|
client_ip String,
|
||||||
|
server_ip String,
|
||||||
|
internal_ip String,
|
||||||
|
external_ip String,
|
||||||
|
client_country String,
|
||||||
|
server_country String,
|
||||||
|
client_asn Nullable(Int64),
|
||||||
|
server_asn Nullable(Int64),
|
||||||
|
server_fqdn String,
|
||||||
|
server_domain String,
|
||||||
|
app String,
|
||||||
|
app_category String,
|
||||||
|
c2s_ttl Nullable(Int32),
|
||||||
|
s2c_ttl Nullable(Int32),
|
||||||
|
c2s_link_id Nullable(Int32),
|
||||||
|
s2c_link_id Nullable(Int32),
|
||||||
|
sessions Int64,
|
||||||
|
bytes Int64,
|
||||||
|
sent_bytes Int64,
|
||||||
|
received_bytes Int64,
|
||||||
|
pkts Int64,
|
||||||
|
sent_pkts Int64,
|
||||||
|
received_pkts Int64,
|
||||||
|
asymmetric_c2s_flows Int64,
|
||||||
|
asymmetric_s2c_flows Int64,
|
||||||
|
c2s_fragments Int64,
|
||||||
|
s2c_fragments Int64,
|
||||||
|
c2s_tcp_lost_bytes Int64,
|
||||||
|
s2c_tcp_lost_bytes Int64,
|
||||||
|
c2s_tcp_retransmitted_pkts Int64,
|
||||||
|
s2c_tcp_retransmitted_pkts Int64
|
||||||
|
)
|
||||||
|
ENGINE = MergeTree
|
||||||
|
PARTITION BY toYYYYMMDD(toDate(recv_time))
|
||||||
|
ORDER BY (vsys_id,
|
||||||
|
direction,
|
||||||
|
ip_protocol,
|
||||||
|
app,
|
||||||
|
client_ip,
|
||||||
|
recv_time);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.traffic_sketch_metric on cluster ck_cluster
|
||||||
|
(
|
||||||
|
log_id UInt64,
|
||||||
|
recv_time Int64,
|
||||||
|
vsys_id Int64,
|
||||||
|
device_id String,
|
||||||
|
device_group String,
|
||||||
|
data_center String,
|
||||||
|
direction String,
|
||||||
|
ip_protocol String,
|
||||||
|
client_ip String,
|
||||||
|
server_ip String,
|
||||||
|
internal_ip String,
|
||||||
|
external_ip String,
|
||||||
|
client_country String,
|
||||||
|
server_country String,
|
||||||
|
client_asn Nullable(Int64),
|
||||||
|
server_asn Nullable(Int64),
|
||||||
|
server_fqdn String,
|
||||||
|
server_domain String,
|
||||||
|
app String,
|
||||||
|
app_category String,
|
||||||
|
c2s_ttl Nullable(Int32),
|
||||||
|
s2c_ttl Nullable(Int32),
|
||||||
|
c2s_link_id Nullable(Int32),
|
||||||
|
s2c_link_id Nullable(Int32),
|
||||||
|
sessions Int64,
|
||||||
|
bytes Int64,
|
||||||
|
sent_bytes Int64,
|
||||||
|
received_bytes Int64,
|
||||||
|
pkts Int64,
|
||||||
|
sent_pkts Int64,
|
||||||
|
received_pkts Int64,
|
||||||
|
asymmetric_c2s_flows Int64,
|
||||||
|
asymmetric_s2c_flows Int64,
|
||||||
|
c2s_fragments Int64,
|
||||||
|
s2c_fragments Int64,
|
||||||
|
c2s_tcp_lost_bytes Int64,
|
||||||
|
s2c_tcp_lost_bytes Int64,
|
||||||
|
c2s_tcp_retransmitted_pkts Int64,
|
||||||
|
s2c_tcp_retransmitted_pkts Int64
|
||||||
|
)
|
||||||
|
ENGINE = Distributed('ck_cluster',
|
||||||
|
'tsg_galaxy_v3',
|
||||||
|
'traffic_sketch_metric_local',
|
||||||
|
rand());
|
||||||
@@ -16,6 +16,7 @@ SELECT recv_time, log_id, decoded_as, session_id, start_timestamp_ms, end_timest
|
|||||||
FROM tsg_galaxy_v3.voip_record where recv_time >= toUnixTimestamp('2030-01-01 00:00:00') AND recv_time <toUnixTimestamp('2030-01-01 00:00:01');
|
FROM tsg_galaxy_v3.voip_record where recv_time >= toUnixTimestamp('2030-01-01 00:00:00') AND recv_time <toUnixTimestamp('2030-01-01 00:00:01');
|
||||||
SELECT log_id, recv_time, vsys_id, timestamp_us, job_id, sled_ip, device_group, traffic_link_id, source_ip, source_port, destination_ip, destination_port, packet, packet_length, measurements
|
SELECT log_id, recv_time, vsys_id, timestamp_us, job_id, sled_ip, device_group, traffic_link_id, source_ip, source_port, destination_ip, destination_port, packet, packet_length, measurements
|
||||||
FROM tsg_galaxy_v3.datapath_telemetry_record where recv_time >= toUnixTimestamp('2030-01-01 00:00:00') AND recv_time <toUnixTimestamp('2030-01-01 00:00:01');
|
FROM tsg_galaxy_v3.datapath_telemetry_record where recv_time >= toUnixTimestamp('2030-01-01 00:00:00') AND recv_time <toUnixTimestamp('2030-01-01 00:00:01');
|
||||||
|
SELECT log_id, recv_time, vsys_id, device_id, device_group, data_center, direction, ip_protocol, client_ip, server_ip, internal_ip, external_ip, client_country, server_country, client_asn, server_asn, server_fqdn, server_domain, app, app_category, c2s_ttl, s2c_ttl, c2s_link_id, s2c_link_id, sessions, bytes, sent_bytes, received_bytes, pkts, sent_pkts, received_pkts, asymmetric_c2s_flows, asymmetric_s2c_flows, c2s_fragments, s2c_fragments, c2s_tcp_lost_bytes, s2c_tcp_lost_bytes, c2s_tcp_retransmitted_pkts, s2c_tcp_retransmitted_pkts
|
||||||
|
FROM tsg_galaxy_v3.traffic_sketch_metric where recv_time >= toUnixTimestamp('2030-01-01 00:00:00') AND recv_time <toUnixTimestamp('2030-01-01 00:00:01');
|
||||||
|
|
||||||
|
|
||||||
@@ -993,3 +993,100 @@ SELECT
|
|||||||
FROM tsg_galaxy_v3.session_record_local
|
FROM tsg_galaxy_v3.session_record_local
|
||||||
WHERE empty(monitor_rule_list) = 0
|
WHERE empty(monitor_rule_list) = 0
|
||||||
;
|
;
|
||||||
|
CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.traffic_sketch_metric_local on cluster ck_cluster
|
||||||
|
(
|
||||||
|
log_id UInt64,
|
||||||
|
recv_time Int64,
|
||||||
|
vsys_id Int64,
|
||||||
|
device_id String,
|
||||||
|
device_group String,
|
||||||
|
data_center String,
|
||||||
|
direction String,
|
||||||
|
ip_protocol String,
|
||||||
|
client_ip String,
|
||||||
|
server_ip String,
|
||||||
|
internal_ip String,
|
||||||
|
external_ip String,
|
||||||
|
client_country String,
|
||||||
|
server_country String,
|
||||||
|
client_asn Nullable(Int64),
|
||||||
|
server_asn Nullable(Int64),
|
||||||
|
server_fqdn String,
|
||||||
|
server_domain String,
|
||||||
|
app String,
|
||||||
|
app_category String,
|
||||||
|
c2s_ttl Nullable(Int32),
|
||||||
|
s2c_ttl Nullable(Int32),
|
||||||
|
c2s_link_id Nullable(Int32),
|
||||||
|
s2c_link_id Nullable(Int32),
|
||||||
|
sessions Int64,
|
||||||
|
bytes Int64,
|
||||||
|
sent_bytes Int64,
|
||||||
|
received_bytes Int64,
|
||||||
|
pkts Int64,
|
||||||
|
sent_pkts Int64,
|
||||||
|
received_pkts Int64,
|
||||||
|
asymmetric_c2s_flows Int64,
|
||||||
|
asymmetric_s2c_flows Int64,
|
||||||
|
c2s_fragments Int64,
|
||||||
|
s2c_fragments Int64,
|
||||||
|
c2s_tcp_lost_bytes Int64,
|
||||||
|
s2c_tcp_lost_bytes Int64,
|
||||||
|
c2s_tcp_retransmitted_pkts Int64,
|
||||||
|
s2c_tcp_retransmitted_pkts Int64
|
||||||
|
)
|
||||||
|
ENGINE = MergeTree
|
||||||
|
PARTITION BY toYYYYMMDD(toDate(recv_time))
|
||||||
|
ORDER BY (vsys_id,
|
||||||
|
direction,
|
||||||
|
ip_protocol,
|
||||||
|
app,
|
||||||
|
client_ip,
|
||||||
|
recv_time);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.traffic_sketch_metric on cluster ck_cluster
|
||||||
|
(
|
||||||
|
log_id UInt64,
|
||||||
|
recv_time Int64,
|
||||||
|
vsys_id Int64,
|
||||||
|
device_id String,
|
||||||
|
device_group String,
|
||||||
|
data_center String,
|
||||||
|
direction String,
|
||||||
|
ip_protocol String,
|
||||||
|
client_ip String,
|
||||||
|
server_ip String,
|
||||||
|
internal_ip String,
|
||||||
|
external_ip String,
|
||||||
|
client_country String,
|
||||||
|
server_country String,
|
||||||
|
client_asn Nullable(Int64),
|
||||||
|
server_asn Nullable(Int64),
|
||||||
|
server_fqdn String,
|
||||||
|
server_domain String,
|
||||||
|
app String,
|
||||||
|
app_category String,
|
||||||
|
c2s_ttl Nullable(Int32),
|
||||||
|
s2c_ttl Nullable(Int32),
|
||||||
|
c2s_link_id Nullable(Int32),
|
||||||
|
s2c_link_id Nullable(Int32),
|
||||||
|
sessions Int64,
|
||||||
|
bytes Int64,
|
||||||
|
sent_bytes Int64,
|
||||||
|
received_bytes Int64,
|
||||||
|
pkts Int64,
|
||||||
|
sent_pkts Int64,
|
||||||
|
received_pkts Int64,
|
||||||
|
asymmetric_c2s_flows Int64,
|
||||||
|
asymmetric_s2c_flows Int64,
|
||||||
|
c2s_fragments Int64,
|
||||||
|
s2c_fragments Int64,
|
||||||
|
c2s_tcp_lost_bytes Int64,
|
||||||
|
s2c_tcp_lost_bytes Int64,
|
||||||
|
c2s_tcp_retransmitted_pkts Int64,
|
||||||
|
s2c_tcp_retransmitted_pkts Int64
|
||||||
|
)
|
||||||
|
ENGINE = Distributed('ck_cluster',
|
||||||
|
'tsg_galaxy_v3',
|
||||||
|
'traffic_sketch_metric_local',
|
||||||
|
rand());
|
||||||
Reference in New Issue
Block a user