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

[prometheus-postgres-exporter] column "replay_lsn" does not exist #4433

Open
AresiusXP opened this issue Apr 8, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@AresiusXP
Copy link

AresiusXP commented Apr 8, 2024

Describe the bug a clear and concise description of what the bug is.

When running the chart for our RDS Postgresql 12.16 database, we get an error that says the following logs:

{"time":"2024-04-08T09:40:25.337786401Z","level":"INFO","msg":"spawning process","app":"vault-env","entrypoint":"[/bin/postgres_exporter --config.file=/etc/postgres_exporter.yml --web.listen-address=:9187]"}
ts=2024-04-08T09:40:25.351Z caller=main.go:86 level=warn msg="Error loading config" err="Error opening config file \"/etc/postgres_exporter.yml\": open /etc/postgres_exporter.yml: no such file or directory"
ts=2024-04-08T09:40:25.351Z caller=proc.go:267 msg="Excluded databases" databases=[]
ts=2024-04-08T09:40:25.353Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:9187
ts=2024-04-08T09:40:25.353Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]:9187
ts=2024-04-08T09:40:48.179Z caller=server.go:74 level=info msg="Established new database connection" fingerprint=my-rds-instance.rds.amazonaws.com:5432
ts=2024-04-08T09:40:48.194Z caller=postgres_exporter.go:613 level=info msg="Semantic version changed" server=my-rds-instance.rds.amazonaws.com:5432 from=0.0.0 to=12.16.0
ts=2024-04-08T09:40:48.200Z caller=namespace.go:236 level=info err="Error running query on database \"my-rds-instance.rds.amazonaws.com:5432\": pg_stat_replication pq: column \"replay_lsn\" does not exist"

I believe this is the cause of why our prometheus query for pg_database_size_bytes is not showing all the databases, since this is the only error.

pg_stat_replication does exist, but the table is empty, which may be the reason why it thinks it doesn't exist.

What's your helm version?

3.14.3

What's your kubectl version?

v1.28.6

Which chart?

prometheus-postgres-exporter

What's the chart version?

6.0.0

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?


automountServiceAccountToken: true

config:
  datasource:
    host: my-rds-instance.rds.amazonaws.com
    user: postgres_exporter
    passwordSecret:
      name: prometheus-postgres-exporter
      key: DATA_SOURCE_PASS
    sslmode: require
    database: postgres

serviceAccount:
  create: true
  name: prometheus-postgres-exporter

resources:
  requests:
    cpu: 0.1
    memory: 64Mi
  limits:
    cpu: 1
    memory: 64Mi

serviceMonitor:
  enabled: true
  labels:
    prometheus: prometheus-monitoring

Enter the command that you execute and failing/misfunctioning.

I'm not executing any commands.

Anything else we need to know?

No response

@AresiusXP AresiusXP added the bug Something isn't working label Apr 8, 2024
@AresiusXP
Copy link
Author

As an update, we're running now Postgresql 15.4, and this error is still happening.

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