Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: "pg_settings_mem_guard_enable-auth-hook" is not a valid metric name - when trying to get timescale metrics. #1102

Closed
aagarwalla-fx opened this issue Dec 10, 2024 · 2 comments

Comments

@aagarwalla-fx
Copy link
Contributor

What did you do?
Start dockerized postgres_exporter as per instructions for timescale DB.

What did you expect to see?
postgres_exporter running stable, and export metrics

What did you see instead? Under which circumstances?
postgres_exporter crashes as soon as it starts.

Environment

  • Image sha -
docker inspect quay.io/prometheuscommunity/postgres-exporter| jq -r '.[].RepoDigests[]' | awk -F@ '{print $2}'
sha256:6999a7657e2f2fb0ca6ebf417213eebf6dc7d21b30708c622f6fcb11183a2bb0
  • PostgreSQL version:

  • Logs:

panic: "pg_settings_mem_guard_enable-auth-hook" is not a valid metric name

goroutine 52 [running]:
github.com/prometheus/client_golang/prometheus.MustNewConstMetric(...)
	/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/value.go:129
main.(*pgSetting).metric(0xc00020c640, 0xc00020a2a0)
	/app/cmd/postgres_exporter/pg_setting.go:99 +0x2ff
main.querySettings(0xc00022e070, 0xc00025a000)
	/app/cmd/postgres_exporter/pg_setting.go:55 +0x1d8
main.(*Server).Scrape(0xc00025a000, 0xc00022e070, 0x0?)
	/app/cmd/postgres_exporter/server.go:120 +0xc8
main.(*Exporter).scrapeDSN(0xc000174000, 0xc00022e070, {0xc0000be140, 0x92})
	/app/cmd/postgres_exporter/datasource.go:114 +0x132
main.(*Exporter).scrape(0xc000174000, 0xc00022e070)
	/app/cmd/postgres_exporter/postgres_exporter.go:678 +0x16b
main.(*Exporter).Collect(0xc000174000, 0xc00022e070)
	/app/cmd/postgres_exporter/postgres_exporter.go:567 +0x25
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
	/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:458 +0xe5
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather in goroutine 39
	/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:548 +0xbab
@777dimas
Copy link

I have the same error:

panic: "pg_settings_mem_guard_enable-auth-hook" is not a valid metric name                                                                                                                                                                                                            │
│                                                                                                                                                                                                                                                                                       │
│ goroutine 51 [running]:                                                                                                                                                                                                                                                               │
│ github.com/prometheus/client_golang/prometheus.MustNewConstMetric(...)                                                                                                                                                                                                                │
│     /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/value.go:129                                                                                                                                                                                                   │
│ main.(*pgSetting).metric(0xc00034fae0, 0xc0002578f0)                                                                                                                                                                                                                                  │
│     /app/cmd/postgres_exporter/pg_setting.go:99 +0x2ff                                                                                                                                                                                                                                │
│ main.querySettings(0xc000225030, 0xc00020a0b0)                                                                                                                                                                                                                                        │
│     /app/cmd/postgres_exporter/pg_setting.go:55 +0x1d8                                                                                                                                                                                                                                │
│ main.(*Server).Scrape(0xc00020a0b0, 0xc000225030, 0xb0?)                                                                                                                                                                                                                              │
│     /app/cmd/postgres_exporter/server.go:120 +0xc8                                                                                                                                                                                                                                    │
│ main.(*Exporter).scrapeDSN(0xc000000180, 0xc000225030, {0xc00002c011, 0x7c})                                                                                                                                                                                                          │
│     /app/cmd/postgres_exporter/datasource.go:114 +0x132                                                                                                                                                                                                                               │
│ main.(*Exporter).scrape(0xc000000180, 0xc000225030)                                                                                                                                                                                                                                   │
│     /app/cmd/postgres_exporter/postgres_exporter.go:678 +0x16b                                                                                                                                                                                                                        │
│ main.(*Exporter).Collect(0xc000000180, 0xc000225030)                                                                                                                                                                                                                                  │
│     /app/cmd/postgres_exporter/postgres_exporter.go:567 +0x25                                                                                                                                                                                                                         │
│ github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()                                                                                                                                                                                                             │
│     /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:458 +0xe5                                                                                                                                                                                          │
│ created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather in goroutine 14                                                                                                                                                                                          │
│     /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:548 +0xbab     

Image ID: quay.io/prometheuscommunity/postgres-exporter@sha256:6999a7657e2f2fb0ca6ebf417213eebf6dc7d21b30708c622f6fcb11183a2bb0

@sysadmind
Copy link
Contributor

v0.17.0 should have the fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants