Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/controller/db/metadb/migrator/schema/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ const (
RAW_SQL_ROOT_DIR = "/etc/metadb/schema/rawsql"

DB_VERSION_TABLE = "db_version"
DB_VERSION_EXPECTED = "7.1.0.2"
DB_VERSION_EXPECTED = "7.1.0.3"
)
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,9 @@ INSERT INTO data_source (id, display_name, data_table_collection, base_data_sour
set @lcuuid = (select uuid());
INSERT INTO data_source (id, display_name, data_table_collection, base_data_source_id, `interval_time`, retention_time, summable_metrics_operator, unsummable_metrics_operator, lcuuid)
VALUES (24, '应用-指标(天级)', 'flow_metrics.application*', 23, 86400, 30*24, 'Sum', 'Avg', @lcuuid);
set @lcuuid = (select uuid());
INSERT INTO data_source (id, display_name, data_table_collection, `interval_time`, retention_time, summable_metrics_operator, unsummable_metrics_operator, lcuuid)
VALUES (25, '应用-性能剖析指标', 'profile.in_process_metrics', 1, 3*24, 'Sum', 'Avg', @lcuuid);

CREATE TABLE IF NOT EXISTS voucher (
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ DROP PROCEDURE AddColumnIfNotExists;

UPDATE db_version SET version='7.1.0.2';

COMMIT;
COMMIT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
DROP PROCEDURE IF EXISTS insert_data_source;

CREATE PROCEDURE insert_data_source()
BEGIN
DECLARE existing_display_name INT DEFAULT 0;

SELECT COUNT(*) INTO existing_display_name
FROM data_source
WHERE id = 25;

IF existing_display_name = 0 THEN
START TRANSACTION;
set @lcuuid = (select uuid());
INSERT INTO data_source (id, display_name, data_table_collection, `interval_time`, retention_time, summable_metrics_operator, unsummable_metrics_operator, lcuuid)
VALUES (25, '应用-性能剖析指标', 'profile.in_process_metrics', 1, 3*24, 'Sum', 'Avg', @lcuuid);
COMMIT;
END IF;

END;

CALL insert_data_source();
DROP PROCEDURE insert_data_source;

UPDATE db_version SET version='7.1.0.3';
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,9 @@ VALUES (23, '应用-指标(小时级)', 'flow_metrics.application*', 8, 3600
INSERT INTO data_source (id, display_name, data_table_collection, base_data_source_id, interval_time, retention_time, summable_metrics_operator, unsummable_metrics_operator, lcuuid)
VALUES (24, '应用-指标(天级)', 'flow_metrics.application*', 23, 86400, 30 * 24, 'Sum', 'Avg', gen_random_uuid());

INSERT INTO data_source (id, display_name, data_table_collection, interval_time, retention_time, summable_metrics_operator, unsummable_metrics_operator, lcuuid)
VALUES (25, '应用-性能剖析指标', 'profile.in_process_metrics', 1, 3 * 24, 'Sum', 'Avg', gen_random_uuid());

CREATE TABLE IF NOT EXISTS report (
id SERIAL PRIMARY KEY,
title VARCHAR(200) NOT NULL DEFAULT '',
Expand Down
1 change: 1 addition & 0 deletions server/controller/http/service/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ var DEFAULT_DATA_SOURCE_DISPLAY_NAMES = []string{
"事件-IO 事件", // event.perf_event
"事件-告警事件", // event.alert_event
"应用-性能剖析", // profile.in_process
"应用-性能剖析指标", // profile.in_process_metrics
"网络-网络策略", // flow_metrics.traffic_policy
"日志-日志数据", // application_log.log
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Field , DBField , Type , Category , Permission
profile_value , profile_value , counter , APP Profile , 111
row , , other , Other , 111
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Field , DisplayName , Unit , Description
profile_value , profile_value , ,
row , 行数 , 个 ,
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Field , DisplayName , Unit , Description
profile_value , profile_value , ,
row , Row Count , ,
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ pod_ns , pod_ns_0 , pod_ns_1
pod_node , pod_node_0 , pod_node_1 , resource , , Universal Tag , 111 , 0 , 110
pod_ingress , pod_ingress_0 , pod_ingress_1 , resource , , Universal Tag , 111 , 0 , 110
pod_service , pod_service_0 , pod_service_1 , resource , , Universal Tag , 111 , 0 , 110
pod_group_type , pod_group_type_0 , pod_group_type_1 , int_enum , pod_group_type , Universal Tag , 111 , 0 , 110
pod_group_type , pod_group_type_0 , pod_group_type_1 , int , , Universal Tag , 111 , 0 , 110
pod_group , pod_group_0 , pod_group_1 , resource , , Universal Tag , 111 , 0 , 110
pod , pod_0 , pod_1 , resource , , Universal Tag , 111 , 0 , 110
service , service_0 , service_1 , resource , , Universal Tag , 111 , 1 , 110
auto_instance_type , auto_instance_type_0 , auto_instance_type_1 , int_enum , auto_instance_type , Universal Tag , 111 , 0 , 110
auto_instance_type , auto_instance_type_0 , auto_instance_type_1 , int , , Universal Tag , 111 , 0 , 110
auto_instance , auto_instance_0 , auto_instance_1 , resource , , Universal Tag , 111 , 0 , 110
auto_service_type , auto_service_type_0 , auto_service_type_1 , int_enum , auto_service_type , Universal Tag , 111 , 0 , 110
auto_service_type , auto_service_type_0 , auto_service_type_1 , int , , Universal Tag , 111 , 0 , 110
auto_service , auto_service_0 , auto_service_1 , resource , , Universal Tag , 111 , 0 , 110
gprocess , gprocess_0 , gprocess_1 , resource , , Universal Tag , 111 , 0 , 110
tap_port_host , tap_port_host , tap_port_host , resource , , Universal Tag , 111 , 1 , 110
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ span_name , Span名称 ,
vtap , 采集器 , 已废弃,请使用 agent。
agent , 采集器 ,

profile_value_unit , 单位 ,
profile_value_unit , 指标单位 ,
profile_event_type , 剖析类型 ,
profile_create_timestamp , 聚合时间 ,
profile_in_timestamp , 写入时间 ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ span_name , Span Name ,
vtap , DeepFlow Agent , Deprecated,please use agent.
agent , DeepFlow Agent ,

profile_value_unit , 单位 ,
profile_event_type , 剖析类型 ,
profile_create_timestamp , 聚合时间 ,
profile_in_timestamp , 写入时间 ,
profile_language_type , 语言类型 ,
profile_value_unit , Metric Unit ,
profile_event_type , Profile Type ,
profile_create_timestamp , Aggregate Time ,
profile_in_timestamp , Ingest Time ,
profile_language_type , Language Type ,
profile_id , ProfileID ,
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Name , ClientName , ServerName , Type , EnumFile , Category , Permission , Deprecated
time , time , time , time , , Timestamp , 111 , 0

region , region , region , resource , , Universal Tag , 110 , 0
az , az , az , resource , , Universal Tag , 110 , 0
host , host , host , resource , , Universal Tag , 100 , 0
chost , chost , chost , resource , , Universal Tag , 111 , 0
vpc , vpc , vpc , resource , , Universal Tag , 111 , 0
router , router , router , resource , , Universal Tag , 110 , 0
dhcpgw , dhcpgw , dhcpgw , resource , , Universal Tag , 110 , 0
lb , lb , lb , resource , , Universal Tag , 110 , 0
lb_listener , lb_listener , lb_listener , resource , , Universal Tag , 110 , 0
natgw , natgw , natgw , resource , , Universal Tag , 110 , 0
redis , redis , redis , resource , , Universal Tag , 110 , 0
rds , rds , rds , resource , , Universal Tag , 110 , 0
pod_cluster , pod_cluster , pod_cluster , resource , , Universal Tag , 111 , 0
pod_ns , pod_ns , pod_ns , resource , , Universal Tag , 111 , 0
pod_node , pod_node , pod_node , resource , , Universal Tag , 111 , 0
pod_ingress , pod_ingress , pod_ingress , resource , , Universal Tag , 111 , 0
pod_service , pod_service , pod_service , resource , , Universal Tag , 111 , 0
pod_group_type , pod_group_type , pod_group_type , int_enum , pod_group_type , Universal Tag , 111 , 0
pod_group , pod_group , pod_group , resource , , Universal Tag , 111 , 0
pod , pod , pod , resource , , Universal Tag , 111 , 0
service , service , service , resource , , Universal Tag , 111 , 1
auto_instance_type , auto_instance_type , auto_instance_type , int_enum , auto_instance_type , Universal Tag , 111 , 0
auto_instance , auto_instance , auto_instance , resource , , Universal Tag , 111 , 0
auto_service_type , auto_service_type , auto_service_type , int_enum , auto_service_type , Universal Tag , 111 , 0
auto_service , auto_service , auto_service , resource , , Universal Tag , 111 , 0
gprocess , gprocess , gprocess , resource , , Universal Tag , 111 , 0
host_ip , host_ip , host_ip , resource , , Universal Tag , 111 , 0
host_hostname , host_hostname , host_hostname , resource , , Universal Tag , 111 , 0
chost_ip , chost_ip , chost_ip , resource , , Universal Tag , 111 , 0
chost_hostname , chost_hostname , chost_hostname , resource , , Universal Tag , 111 , 0
pod_node_ip , pod_node_ip , pod_node_ip , resource , , Universal Tag , 111 , 0
pod_node_hostname , pod_node_hostname , pod_node_hostname , resource , , Universal Tag , 111 , 0

k8s.label , k8s.label , k8s.label , map , , Custom Tag , 111 , 0
k8s.annotation , k8s.annotation , k8s.annotation , map , , Custom Tag , 111 , 0
k8s.env , k8s.env , k8s.env , map , , Custom Tag , 111 , 0
cloud.tag , cloud.tag , cloud.tag , map , , Custom Tag , 111 , 0

ip , ip , ip , ip , , Network Layer , 111 , 0
is_ipv4 , is_ipv4 , is_ipv4 , int_enum , ip_type , Network Layer , 111 , 0

app_service , app_service , app_service , string_enum , , Service Info , 111 , 0
app_instance , app_instance , app_instance , string_enum , , Service Info , 111 , 0
process_id , process_id , process_id , int , , Service Info , 111 , 0

vtap , vtap , vtap , resource , , Capture Info , 111 , 1
agent , agent , agent , resource , , Capture Info , 111 , 0

profile_event_type , profile_event_type , profile_event_type , string , , Profile Info , 111 , 0
profile_language_type , profile_language_type , profile_language_type , string_enum , profile_language_type , Profile Info , 111 , 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Name , DisplayName , Description
time , 时间 ,

region , 区域 ,
az , 可用区 ,
host , 宿主机 , 承载虚拟机的宿主机。
chost , 云主机 , 包括虚拟机、裸金属服务器。
vpc , VPC ,
router , 路由器 ,
dhcpgw , DHCP 网关 ,
lb , 负载均衡器 ,
lb_listener , 负载均衡监听器 ,
natgw , NAT 网关 ,
redis , Redis ,
rds , RDS ,
pod_cluster , K8s 容器集群 ,
pod_ns , K8s 命名空间 ,
pod_node , K8s 容器节点 ,
pod_ingress , K8s Ingress ,
pod_service , K8s 容器服务 ,
pod_group_type , K8s 工作负载类型 ,
pod_group , K8s 工作负载 , 例如 Deployment、StatefulSet、Daemonset 等。
pod , K8s 容器 POD ,
service , 服务 , 已废弃,请使用 pod_service
auto_instance_type , 自动实例类型 , `auto_instance`实例对应的类型。
auto_instance , 自动实例 , IP 对应的实例,实例为IP时,auto_instance_id显示为子网ID。
auto_service_type , 自动服务类型 , `auto_service`实例对应的类型。
auto_service , 自动服务 , 在`auto_instance`基础上,将容器服务的 ClusterIP 与工作负载聚合为服务,实例为IP时,auto_service_id显示为子网ID。
gprocess , 进程 ,
host_ip , 宿主机 , 宿主机的管理 IP。
host_hostname , 宿主机 , 宿主机的 Hostname。
chost_ip , 云主机 , 云主机的主 IP。
chost_hostname , 云主机 , 云主机的 Hostname。
pod_node_ip , K8s 容器节点 , 容器节点的主 IP。
pod_node_hostname , K8s 容器节点 , 容器节点的 Hostname。

k8s.label , K8s Label ,
k8s.annotation , K8s Annotation ,
k8s.env , K8s Env ,
cloud.tag , Cloud Tag ,

ip , IP 地址 ,
is_ipv4 , IPv4 标志 ,

app_service , 应用服务 ,
app_instance , 应用实例 ,
process_id , 进程 ID ,

vtap , 采集器 , 已废弃,请使用 agent。
agent , 采集器 ,

profile_event_type , 剖析类型 ,
profile_language_type , 语言类型 ,
Loading
Loading