Metrics exporter publishes NaN for per CPU, disk and network metrics on ClickHouse 26.8
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go, kubernetes
- Ambito
- observability
Direzione di ricerca
Start in pkg/metrics/clickhouse/clickhouse_metrics_fetcher.go at queryMetricsSQLTemplate, then read the existing excludeRegexp handling. Run test_010051 against ClickHouse 26.8 to check the CPU metric pattern; done means keyed asynchronous metrics are exported with the expected labels and values, and the existing per-CPU exclusions still work. The issue author says they already have a patch and plan to open a draft PR.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
ClickHouse 26.8 changed how it publishes the asynchronous metrics that are broken down per CPU core, block device, network interface, disk, temperature sensor, memory controller and logging channel. The metrics exporter only reads the metric and value columns of system.asynchronous_metrics, so on 26.8 it exposes these metrics as a single series with value NaN and drops the real values.
Details
The new server setting asynchronous_metrics_key_values_mode defaults to key_values in 26.8. In that mode each family is one row in system.asynchronous_metrics: value is nan and the per key values are in the new key_values Map column.
| 26.3 | 26.8 | |
|---|---|---|
system.asynchronous_metrics rows matching OS.*CPU[0-9]+ |
OSUserTimeCPU0 ... OSUserTimeCPU9 |
none |
| Row for the family | none | OSUserTimeCPU, value = nan, key_values = {'0': ..., '1': ...} |
What the exporter returns on 26.8:
chi_clickhouse_metric_OSUserTimeCPU{chi="...",hostname="...",namespace="..."} NaN
Affected families, from the setting's documentation: per CPU core (OSUserTimeCPU, OSIdleTimeCPU, CPUFrequencyMHz, ...), block device (BlockReadBytes, ...), network interface (NetworkReceiveBytes, ...), disk (DiskTotal, ...), temperature sensor, memory controller (EDAC...) and logging channel.
This is also what makes test_010051 fail on 26.8: its CPU metric pattern never matches.
The setting can restore the old names (asynchronous_metrics_key_values_mode: legacy_names or both), but the exporter should handle the default.
Where
pkg/metrics/clickhouse/clickhouse_metrics_fetcher.go, queryMetricsSQLTemplate, on the 0.28.0 branch (the query is the same in 0.27.4).
Proposed fix
Detect the key_values column in system.columns, then read the keyed rows with ARRAY JOIN key_values AS kv and publish each as the same metric name with a key label. Apply the existing excludeRegexp filters to the pre 26.8 name of the series (OSUserTimeCPU3, CPUFrequencyMHz_0), so the default per CPU exclusion keeps working. I have a patch and will open a draft PR.
- Lingua principale
- Go
- Stelle
- 2.6k
- Fork
- 584
- Merge medio
- 4g 11h
- PR unite (30g)
- 15
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Altinity/clickhouse-operator
-
Counter metrics are missing the conventional _total suffixForse già presa @mehrdadbn9 l’ha presa 29 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Altinity/clickhouse-operator#2093 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
ClickHouseBackup CR provides no way to configure pod labels/attributes and other fieldsForse già presa @Slach l’ha presa 2 giorni fa. Aperta
Altinity/clickhouse-operator#2141 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Altinity/clickhouse-operator#2140 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Altinity/clickhouse-operator#2129 ·
I maintainer di solito rispondono entro 2 giorni
-
StatefulSet stays deleted after a rejected create in the Recreate fallback: no retry until the operator restartsForse già presa @Slach l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Altinity/clickhouse-operator#2126 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di Altinity/clickhouse-operator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
JakeChampion/lang#14392 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
jordansmall/spindrift#6557 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Custom tool truncation leaves unused stream copies openForse già presa @OUAO-FRANK l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[v3] KeyBindingManager calls (Add/Remove) are not converted into a case-insensitive accelerator.KeyApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
crmne/hyprmoncfg#114 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno