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

Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer #1072

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

n-rodriguez
Copy link
Contributor

@n-rodriguez n-rodriguez commented Oct 7, 2024

@n-rodriguez n-rodriguez force-pushed the wip/checkpoints_timed branch 4 times, most recently from 9f9dc26 to 40e2774 Compare October 7, 2024 16:51
@n-rodriguez n-rodriguez force-pushed the wip/checkpoints_timed branch from 40e2774 to b08b70d Compare October 17, 2024 18:05
@n-rodriguez n-rodriguez force-pushed the wip/checkpoints_timed branch 2 times, most recently from 49b1a80 to 65abcb5 Compare October 28, 2024 18:15
@n-rodriguez
Copy link
Contributor Author

Hi there! Any news?

@n-rodriguez
Copy link
Contributor Author

Ping @sysadmind

@n-rodriguez n-rodriguez force-pushed the wip/checkpoints_timed branch from 65abcb5 to 578f4d6 Compare November 13, 2024 00:53
@BupycHuk
Copy link

@SuperQ @wrouesnel @sysadmind, could you please reiew this PR, it's important for PG17 monitoring.

@michael-todorovic
Copy link

Hello,
I was interested in this PR as we start to get some PG17. However, we moved to multi-target pattern and we're encountering some issues with PG<17. Here's what I did:

I start a very simple PG16:

docker run --rm -p 5416:5432 -e POSTGRES_PASSWORD=postgres postgres:16 -d postgres

I have a config.yml so the exporter can remotely connect to PG:

auth_modules:
  monitoring:
    type: userpass
    userpass:
      username: postgres
      password: postgres

I start the exporter (with the merged PR):

./postgres_exporter --config.file=config.yml --collector.stat_checkpointer

and I call the exporter:

curl 'http://localhost:9187/probe?auth_module=monitoring&target=localhost:5416/postgres?sslmode=disable'

The exporter outputs this error:

time=2024-11-27T14:32:02.679+01:00 level=ERROR source=collector.go:201 msg="collector failed" target="localhost:5416/postgres?sslmode=disable" name=stat_checkpointer duration_seconds=0.013500983 err="pq: relation \"pg_stat_checkpointer\" does not exist"

I'll try to check how to improve the current PR so it can work in this mode 😄

michael-todorovic added a commit to michael-todorovic/postgres_exporter that referenced this pull request Nov 27, 2024
Signed-off-by: Michael Todorovic <michael.todorovic@outlook.com>
@n-rodriguez
Copy link
Contributor Author

ping @sysadmind @wrouesnel @SuperQ

Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the code is good and should be good to merge as soon as the Copyright dates are updated.

collector/pg_stat_checkpointer.go Outdated Show resolved Hide resolved
collector/pg_stat_checkpointer.go Show resolved Hide resolved
collector/pg_stat_checkpointer_test.go Outdated Show resolved Hide resolved
@n-rodriguez n-rodriguez force-pushed the wip/checkpoints_timed branch from 578f4d6 to 8a9f10c Compare December 23, 2024 00:36
@michael-todorovic
Copy link

👋 @n-rodriguez , would you please check the changes in n-rodriguez#1?
In multi-target mode, the current MR is preventing the exporter to work so I provided some fixes for it :)

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

Successfully merging this pull request may close these issues.

checkpoints_timed not found when monitoring Postgres 17beta3
4 participants