postgres_exporter
postgres_exporter copied to clipboard
Getting settings from Azure PG
What did you do? Try to connect to the Azure-managed PostgreSQL instance.
What did you expect to see? Successful connection and getting metrics.
What did you see instead? Under which circumstances? Go's panic in the logs.
Environment
- System information: Azure AKS
- postgres_exporter version: quay.io/prometheuscommunity/postgres-exporter:v0.9.0
- postgres_exporter flags: --log.level=warn --log.format=logger:stdout?json=true
- PostgresSQL version: 12.5
- Logs:
panic: Error converting setting "sync_commit_cancel_wait" value "Disabled" to float: strconv.ParseFloat: parsing "Disabled": invalid syntax
goroutine 25 [running]:
main.(*pgSetting).metric(0xc0002d5bd0, 0xc0001e8210, 0x5, 0x5)
/app/cmd/postgres_exporter/pg_setting.go:80 +0x4d3
main.querySettings(0xc00006b560, 0xc00011a9a0, 0x0, 0x0)
/app/cmd/postgres_exporter/pg_setting.go:49 +0x228
main.(*Server).Scrape(0xc00011a9a0, 0xc00006b560, 0xc00011a900, 0x0, 0x0)
/app/cmd/postgres_exporter/postgres_exporter.go:1030 +0x1a5
main.(*Exporter).scrapeDSN(0xc00011a8f0, 0xc00006b560, 0xc000068230, 0x68, 0x5, 0x1)
/app/cmd/postgres_exporter/postgres_exporter.go:1728 +0x147
main.(*Exporter).scrape(0xc00011a8f0, 0xc00006b560)
/app/cmd/postgres_exporter/postgres_exporter.go:1618 +0x134
main.(*Exporter).Collect(0xc00011a8f0, 0xc00006b560)
/app/cmd/postgres_exporter/postgres_exporter.go:1259 +0x39
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:448 +0x169
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:538 +0xe8e
Same here. @unitto1 any chance you found a solution for this issue?
Same here. @unitto1 any chance you found a solution for this issue?
unfortunately, nope =(
Same here. @unitto1 any chance you found a solution for this issue?
unfortunately, nope =(
I managed to get some stuff working by adding disableSettingsMetrics
(using the Helm chart), it's not complete but I get some metrics reported and not errors.
Seems like Azure returns "Disabled"
instead of 0
/ 1
or booleans for some configurations.
Same here. @unitto1 any chance you found a solution for this issue?
unfortunately, nope =(
I managed to get some stuff working by adding
disableSettingsMetrics
(using the Helm chart), it's not complete but I get some metrics reported and not errors.Seems like Azure returns
"Disabled"
instead of0
/1
or booleans for some configurations.
Yes, this is the reason for failure. Also, Azure restrict this parameter for modification from REPL and from UI
Fix by https://github.com/prometheus-community/postgres_exporter/pull/587
postgres=> SHOW sync_commit_cancel_wait;
sync_commit_cancel_wait
-------------------------
Disabled
(1 row)
postgres=> SET sync_commit_cancel_wait TO 'Disabled';
ERROR: invalid value for parameter "sync_commit_cancel_wait": "Disabled"
postgres=> SET sync_commit_cancel_wait TO '666';
SET
postgres=> SHOW sync_commit_cancel_wait;
sync_commit_cancel_wait
-------------------------
Disabled
(1 row)
When will it be released?
ETA for release?