fix(monitoring): add missing ClickHouse Prometheus port and fix dashboard queries
- Add port 9126 mapping for ClickHouse Prometheus metrics endpoint (was configured in prometheus_ch.xml but not exposed in docker-compose.yml) - Fix CPU Usage panel: use delta() instead of rate() for gauge metric ClickHouseProfileEvents_OSCPUVirtualTimeMicroseconds is a gauge, not counter - Add explicit datasource blocks to dashboard queries for consistency ClickHouse ProfileEvents metrics correctly use rate() — they are counters. Warning about missing _total suffix is expected (ClickHouse naming convention).
This commit is contained in:
@@ -385,6 +385,10 @@
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus_uid"
|
||||
},
|
||||
"expr": "rate(ClickHouseProfileEvents_Query[1m])",
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -671,6 +675,10 @@
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus_uid"
|
||||
},
|
||||
"expr": "rate(ClickHouseProfileEvents_InsertedRows[1m])",
|
||||
"refId": "A"
|
||||
}
|
||||
@@ -967,6 +975,10 @@
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus_uid"
|
||||
},
|
||||
"expr": "rate(ClickHouseProfileEvents_Merge[1m])",
|
||||
"refId": "A"
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ services:
|
||||
ports:
|
||||
- "8002:9000"
|
||||
- "9123:8123"
|
||||
- "9126:9126" # ClickHouse Prometheus metrics endpoint
|
||||
|
||||
kafka:
|
||||
image: apache/kafka:3.8.0
|
||||
|
||||
Reference in New Issue
Block a user