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

Error when running the postgres exporter with postgres 17 #2388

Open
cipherself opened this issue Jan 11, 2025 · 0 comments
Open

Error when running the postgres exporter with postgres 17 #2388

cipherself opened this issue Jan 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@cipherself
Copy link

cipherself commented Jan 11, 2025

What's wrong?

postgres 17 removed the checkpoints_timed column from pg_stat_pgwriter causing the following error

alloy  | ts=2025-01-11T23:43:24.476671414Z level=error msg="collector failed" component_path=/ component_id=prometheus.exporter.postgres.dbname name=stat_bgwriter duration_seconds=0.005531275 err="pq: column \"checkpoints_timed\" does not exist

Apparently this has been fixed on the master branch of postgres-exporter prometheus-community/postgres_exporter#1072 but still hasn't been released.

Steps to reproduce

  1. Run a postgres 17 database
  2. Configure alloy to scrap metrics from it

System information

Linux 6.1.0-25-amd64

Software version

v1.5.1

Configuration

prometheus.exporter.postgres "testdb" {
  data_source_names = ["postgresql://monitoring:monitoring@db:5432/testdb?sslmode=disable"]
}

prometheus.scrape "testdb" {
  targets    = prometheus.exporter.postgres.testdb.targets
}

Logs

alloy  | ts=2025-01-11T23:43:24.476671414Z level=error msg="collector failed" component_path=/ component_id=prometheus.exporter.postgres.dbname name=stat_bgwriter duration_seconds=0.005531275 err="pq: column \"checkpoints_timed\" does not exist
@cipherself cipherself added the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant