From bd86b262cf1ccad89e845c9b4cba423ce49cb9d1 Mon Sep 17 00:00:00 2001 From: weixiang1862 <652048614@qq.com> Date: Wed, 17 Jul 2024 13:54:15 +0800 Subject: [PATCH] Fix es, mysql, rabbitmq dashboards typos and missing expressions. (#12458) --- docs/en/changes/changes.md | 1 + .../postgresql/postgresql-service.yaml | 2 +- .../elasticsearch/elasticsearch-index.json | 17 +++++++++++++---- .../mysql/mysql-instance.json | 2 +- .../postgresql/postgresql-service.json | 2 +- .../rabbitmq/rabbitmq-node.json | 2 +- .../redis/redis-service.json | 2 +- 7 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 7cc4771952b4..0895c388663e 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -36,6 +36,7 @@ * Support aggregation operators in PromQL query. * Update the kubernetes HTTP latency related metrics source unit from `ns` to `ms`. * Support BanyanDB internal stream query execution tracing. +* Fix es, mysql, rabbitmq dashboards typos and missing expressions. #### UI diff --git a/oap-server/server-starter/src/main/resources/otel-rules/postgresql/postgresql-service.yaml b/oap-server/server-starter/src/main/resources/otel-rules/postgresql/postgresql-service.yaml index 60b705a97107..f5b7ed02ddff 100644 --- a/oap-server/server-starter/src/main/resources/otel-rules/postgresql/postgresql-service.yaml +++ b/oap-server/server-starter/src/main/resources/otel-rules/postgresql/postgresql-service.yaml @@ -62,7 +62,7 @@ metricsRules: ## cache and temporary file - name: cache_hit_rate - exp: (pg_stat_database_blks_hit*100 / (pg_stat_database_blks_read + pg_stat_database_blks_hit)).sum(['service_instance_id','host_name']) + exp: (pg_stat_database_blks_hit*100 / (pg_stat_database_blks_read + pg_stat_database_blks_hit)).avg(['service_instance_id','host_name']) - name: temporary_files_rate exp: pg_stat_database_temp_bytes.sum(['service_instance_id','host_name']).rate('PT1M') diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json index 63eec1d950dd..c859b14e113d 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json @@ -389,7 +389,10 @@ }, "widget": { "title": "Documents (Primary Shards)" - } + }, + "expressions": [ + "meter_elasticsearch_index_indices_docs_primary" + ] }, { "x": 8, @@ -408,7 +411,10 @@ }, "widget": { "title": "Documents Created Per Min (Primary Shards)" - } + }, + "expressions": [ + "meter_elasticsearch_index_indices_docs_primary_rate" + ] }, { "x": 16, @@ -584,7 +590,7 @@ "title": "Deleted Documents Count (Primary Shard)" }, "expressions": [ - "latest(meter_elasticsearch_index_indices_docs_primary)" + "latest(meter_elasticsearch_index_indices_deleted_docs_primary)" ] }, { @@ -627,7 +633,10 @@ }, "widget": { "title": "Shards Documents" - } + }, + "expressions": [ + "meter_elasticsearch_index_indices_shards_docs" + ] } ], "layer": "ELASTICSEARCH", diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json index e686756ab329..617cba9ec8ef 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json @@ -276,7 +276,7 @@ } ], "expressions": [ - "meter_mysql_slow_queries_rate" + "meter_mysql_instance_slow_queries_rate" ] }, { diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json index 2c37473d47ab..6caa93a35fa2 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json @@ -284,7 +284,7 @@ "title": "Cache Hit Rate (%)" }, "expressions": [ - "aggregate_labels(meter_pg_cache_hit_rate,sum)" + "aggregate_labels(meter_pg_cache_hit_rate,avg)" ], "metricConfig": [ { diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json index b980121c0d9e..145b7b22a0ad 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json @@ -97,7 +97,7 @@ "showUnit": true }, "widget": { - "title": "Collections" + "title": "Connections" }, "expressions": [ "latest(meter_rabbitmq_node_connections_total)" diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json index 7408dcb9fe5f..1bb9036d8478 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json @@ -125,7 +125,7 @@ } ], "expressions": [ - "aggregate_labels(meter_redis_hit_rate,sum)" + "aggregate_labels(meter_redis_hit_rate,avg)" ] }, {