summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangwei <[email protected]>2024-11-11 16:08:39 +0800
committerwangwei <[email protected]>2024-11-11 16:08:39 +0800
commit4d50ed867ab017528a6161ee94e06f6ddcfcf233 (patch)
treee86ca214332bfc4539f376391270aab11f312379
parentf48248872786dda67e2c8ebf8d1143ae04d6861a (diff)
[Fix][schema] Schema 移除aggregation function unit 定义(TSG-23417)
-rw-r--r--config/flyway/tsg/R__init_datasets.sql2
-rw-r--r--config/nacos/config/fixed-127.0.0.1_8848-cn_nacos/data/config-data-tenant/cn/Galaxy/public_schema_info.json60
-rw-r--r--config/nacos/config/fixed-127.0.0.1_8848-tsg_nacos/data/config-data-tenant/tsg/Galaxy/public_schema_info.json57
3 files changed, 40 insertions, 79 deletions
diff --git a/config/flyway/tsg/R__init_datasets.sql b/config/flyway/tsg/R__init_datasets.sql
index 07a76e07..a58c7366 100644
--- a/config/flyway/tsg/R__init_datasets.sql
+++ b/config/flyway/tsg/R__init_datasets.sql
@@ -124,7 +124,7 @@ INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`,
INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('transaction-record-list', 'transaction_record', 'qgw', 'sql', '{ "statement": "SELECT ${columns} FROM transaction_record WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN(${vsys_id}) AND ( ${filter}) ORDER BY recv_time DESC LIMIT ${limit}" }',null);
INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('transaction-record-count', 'transaction_record', 'qgw', 'sql', '{ "statement": "SELECT count(1) as count FROM transaction_record WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN(${vsys_id}) AND ( ${filter})" }',null);
INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('assessment-event-list', 'assessment_event', 'qgw', 'sql', '{ "statement": " SELECT ${columns} FROM assessment_event WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN (${vsys_id}) AND ( ${filter} ) ORDER BY recv_time DESC LIMIT ${limit}" }',null);
-INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('assessment-event-count ', 'assessment_event', 'qgw', 'sql', '{ "statement": "SELECT count(1) as count FROM assessment_event WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN (${vsys_id}) AND ( ${filter} )" }',null);
+INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('assessment-event-count', 'assessment_event', 'qgw', 'sql', '{ "statement": "SELECT count(1) as count FROM assessment_event WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN (${vsys_id}) AND ( ${filter} )" }',null);
INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('security-event-list', 'security_event', 'qgw', 'sql', '{ "statement": "SELECT ${columns} FROM security_event WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN(${vsys_id}) AND ( ${filter}) ORDER BY recv_time DESC LIMIT ${limit}" }',null);
INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('security-event-count', 'security_event', 'qgw', 'sql', '{ "statement": "SELECT count(1) as count FROM security_event WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN(${vsys_id}) AND ( ${filter})" }',null);
INSERT INTO `dataset` (`identifier_name`, `category`, `backend_engine`, `type`, `template`, `description`) VALUES ('security-event-timeline', 'security_event', 'qgw', 'sql', '{ "statement": "SELECT FROM_UNIXTIME(TIME_FLOOR_WITH_FILL(recv_time, CHART_GRANULARITY(''${start_time}'', ''${end_time}''), ''zero'')) AS stat_time, security_action as type, COUNT(1) as sessions, SUM(sent_bytes + received_bytes) as bytes, SUM(sent_pkts + received_pkts) as packets FROM security_event WHERE recv_time >= UNIX_TIMESTAMP(''${start_time}'') AND recv_time < UNIX_TIMESTAMP(''${end_time}'') AND vsys_id IN(${vsys_id}) AND notEmpty(security_action) AND ( ${filter}) group by stat_time, security_action order by stat_time asc" }',null);
diff --git a/config/nacos/config/fixed-127.0.0.1_8848-cn_nacos/data/config-data-tenant/cn/Galaxy/public_schema_info.json b/config/nacos/config/fixed-127.0.0.1_8848-cn_nacos/data/config-data-tenant/cn/Galaxy/public_schema_info.json
index 25e477b4..bf58a68b 100644
--- a/config/nacos/config/fixed-127.0.0.1_8848-cn_nacos/data/config-data-tenant/cn/Galaxy/public_schema_info.json
+++ b/config/nacos/config/fixed-127.0.0.1_8848-cn_nacos/data/config-data-tenant/cn/Galaxy/public_schema_info.json
@@ -5,141 +5,121 @@
"name": "COUNT",
"label": "COUNT",
"function": "count(expr)",
- "metric_type": "count",
- "unit": "short"
+ "metric_type": "count"
},
{
"name": "COUNT_DISTINCT",
"label": "COUNT_DISTINCT",
"function": "COUNT_DISTINCT(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "UNIQUE_COUNT",
"label": "UNIQUE_COUNT",
"function": "UNIQUE_COUNT(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "AVG",
"label": "AVG",
"function": "avg(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "SUM",
"label": "SUM",
"function": "sum(expr)",
- "metric_type": "count",
- "unit": "short"
+ "metric_type": "count"
},
{
"name": "MAX",
"label": "MAX",
"function": "max(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "MIN",
"label": "MIN",
"function": "min(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "MEDIAN",
"label": "MEDIAN",
"function": "MEDIAN(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "MEDIAN_HDR",
"label": "MEDIAN_HDR",
"function": "MEDIAN_HDR(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "QUANTILE",
"label": "QUANTILE",
"function": "QUANTILE(expr, level)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P95_PERCENTILE",
"label": "P95_PERCENTILE",
"function": "QUANTILE(expr, 0.95)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P99_PERCENTILE",
"label": "P99_PERCENTILE",
"function": "QUANTILE(expr, 0.99)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "QUANTILE_HDR",
"label": "QUANTILE_HDR",
"function": "QUANTILE_HDR(expr, level)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P95_PERCENTILE_HDR",
"label": "P95_PERCENTILE_HDR",
"function": "QUANTILE_HDR(expr, 0.95)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P99_PERCENTILE_HDR",
"label": "P99_PERCENTILE_HDR",
"function": "QUANTILE_HDR(expr, 0.99)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "PERCENTILES_HDR",
"label": "PERCENTILES_HDR",
"function": "PERCENTILES_HDR(expr)",
- "metric_type": "histogram",
- "unit": "short"
+ "metric_type": "histogram"
},
{
"name": "APPROX_COUNT_DISTINCT_HLLD",
"label": "COUNT_DISTINCT_HLLD",
"function": "APPROX_COUNT_DISTINCT_HLLD(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "APPROX_COUNT_DISTINCT_DS_HLL",
"label": "COUNT_DISTINCT_DS_HLL",
"function": "APPROX_COUNT_DISTINCT_DS_HLL(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "RATE",
"label": "RATE",
"function": "RATE(<expr>, <duration>, [interval])",
- "metric_type": "gauge",
- "unit": "sps"
+ "metric_type": "gauge"
},
{
"name": "BITRATE",
"label": "BITRATE",
"function": "RATE(<expr>, <duration>, [interval]) * 8",
- "metric_type": "gauge",
- "unit": "bps"
+ "metric_type": "gauge"
}
],
"date": [
diff --git a/config/nacos/config/fixed-127.0.0.1_8848-tsg_nacos/data/config-data-tenant/tsg/Galaxy/public_schema_info.json b/config/nacos/config/fixed-127.0.0.1_8848-tsg_nacos/data/config-data-tenant/tsg/Galaxy/public_schema_info.json
index 57c35712..640356e7 100644
--- a/config/nacos/config/fixed-127.0.0.1_8848-tsg_nacos/data/config-data-tenant/tsg/Galaxy/public_schema_info.json
+++ b/config/nacos/config/fixed-127.0.0.1_8848-tsg_nacos/data/config-data-tenant/tsg/Galaxy/public_schema_info.json
@@ -5,106 +5,91 @@
"name": "COUNT",
"label": "COUNT",
"function": "count(expr)",
- "metric_type": "count",
- "unit": "short"
+ "metric_type": "count"
},
{
"name": "COUNT_DISTINCT",
"label": "COUNT_DISTINCT",
"function": "COUNT_DISTINCT(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "UNIQUE_COUNT",
"label": "UNIQUE_COUNT",
"function": "UNIQUE_COUNT(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "AVG",
"label": "AVG",
"function": "avg(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "SUM",
"label": "SUM",
"function": "sum(expr)",
- "metric_type": "count",
- "unit": "short"
+ "metric_type": "count"
},
{
"name": "MAX",
"label": "MAX",
"function": "max(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "MIN",
"label": "MIN",
"function": "min(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "MEDIAN",
"label": "MEDIAN",
"function": "MEDIAN(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "MEDIAN_HDR",
"label": "MEDIAN_HDR",
"function": "MEDIAN_HDR(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "QUANTILE",
"label": "QUANTILE",
"function": "QUANTILE(expr, level)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P95_PERCENTILE",
"label": "P95_PERCENTILE",
"function": "QUANTILE(expr, 0.95)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P99_PERCENTILE",
"label": "P99_PERCENTILE",
"function": "QUANTILE(expr, 0.99)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "QUANTILE_HDR",
"label": "QUANTILE_HDR",
"function": "QUANTILE_HDR(expr, level)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P95_PERCENTILE_HDR",
"label": "P95_PERCENTILE_HDR",
"function": "QUANTILE_HDR(expr, 0.95)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "P99_PERCENTILE_HDR",
"label": "P99_PERCENTILE_HDR",
"function": "QUANTILE_HDR(expr, 0.99)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "PERCENTILES_HDR",
@@ -116,29 +101,25 @@
"name": "APPROX_COUNT_DISTINCT_HLLD",
"label": "COUNT_DISTINCT_HLLD",
"function": "APPROX_COUNT_DISTINCT_HLLD(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "APPROX_COUNT_DISTINCT_DS_HLL",
"label": "COUNT_DISTINCT_DS_HLL",
"function": "APPROX_COUNT_DISTINCT_DS_HLL(expr)",
- "metric_type": "gauge",
- "unit": "short"
+ "metric_type": "gauge"
},
{
"name": "RATE",
"label": "RATE",
"function": "RATE(<expr>, <duration>, [interval])",
- "metric_type": "gauge",
- "unit": "sps"
+ "metric_type": "gauge"
},
{
"name": "BITRATE",
"label": "BITRATE",
"function": "RATE(<expr>, <duration>, [interval]) * 8",
- "metric_type": "gauge",
- "unit": "bps"
+ "metric_type": "gauge"
},
{
"name": "UNIQUE_ARRAY",