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:
2026-02-08 23:00:32 +03:00
parent a310bc6c39
commit 39df4f2469
2 changed files with 13 additions and 0 deletions
@@ -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"
}