Skip to content

Add a Collector for pg_stat_io. #1169

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

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

Conversation

sfc-gh-pnuttall
Copy link
Contributor

Docs: https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-IO-VIEW

We use this in production. One problem is that the stats for a vacuum are reported when the vacuum ends, not continuously.

BoweFlex and others added 2 commits June 18, 2025 11:00
…1158)

* Update querySettings Error Return in Scrape

If there are errors querying namespace mappings, the potential error from querySettings is obscured. Adding an immediate return if there are errors retreiving settings.

Signed-off-by: Jonathan Bowe <[email protected]>

* Improve Verbosity of queryNamespaceMappings Errors

Previously if any errors were encountered by queryNamespaceMappings, only a count of those errors was returned - making debugging those errors harder than it needs to be.

I'm changing this to immediately return nil if no errors are encountered, and otherwise an error will be formatted with each of the namespaces and what the error was for that namespace.

Signed-off-by: Jonathan Bowe <[email protected]>

* Simplify Error Message

Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: Jonathan Bowe <[email protected]>

---------

Signed-off-by: Jonathan Bowe <[email protected]>
Signed-off-by: Jonathan Bowe <[email protected]>
Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: Peter Nuttall <[email protected]>
Docs: https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-IO-VIEW

We use this in production. One problem is that the stats for a vacuum
are reported when the vacuum ends, not continuously.

Signed-off-by: Peter Nuttall <[email protected]>
Signed-off-by: Peter Nuttall <[email protected]>
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.

2 participants