Add a collector for pg_proctab. - #1168
Open
sfc-gh-pnuttall wants to merge 2 commits into
Open
sfc-gh-pnuttall wants to merge 2 commits into
sfc-gh-pnuttall wants to merge 2 commits into
Conversation
Docs: https://github.com/markwkm/pg_proctab/tree/main This collector is useful when: * You have access to postgres, but not the underlying machine the postgres server is running on. * The `pg_proctab` extension is installed. We use this in AWS RDS and GCP CloudSQL. Signed-off-by: Peter Nuttall <peter.nuttall@snowflake.com>
ArthurSens
reviewed
Sep 11, 2026
ArthurSens
left a comment
Contributor
There was a problem hiding this comment.
Hey, sorry for the delayed review here! The codebase has been heavily refactored a few months back, so we might need to do a heavy rebase or start the work fresh from a new PR 😓
I've added comments below. Also, do we want to include load5, load15, swapfree and swapcached?
| prometheus.BuildFQName( | ||
| namespace, | ||
| proctabSubsystem, | ||
| "memused", |
Contributor
There was a problem hiding this comment.
Following Prometheus naming conventions, the unit of the metric should be part of its name as a suffix. Can we include _bytes?
This apply to all other memory metrics
Comment on lines
+220
to
+225
| emitMemMetric(memused, pgMemusedDesc, ch) | ||
| emitMemMetric(memfree, pgMemfreeDesc, ch) | ||
| emitMemMetric(memshared, pgMemsharedDesc, ch) | ||
| emitMemMetric(membuffers, pgMembuffersDesc, ch) | ||
| emitMemMetric(memcached, pgMemcachedDesc, ch) | ||
| emitMemMetric(swapused, pgSwapusedDesc, ch) |
Contributor
There was a problem hiding this comment.
lets move this to after we query the CPU/load metrics. If CPU/load collection fails, this collector will report a failure while providing partial data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs: https://github.com/markwkm/pg_proctab/tree/main
This collector is useful when:
pg_proctabextension is installed.We use this in AWS RDS and GCP CloudSQL.