Skip to content

Rds postgres error logs from monitor user #765

Closed Answered by burningalchemist
hulakv asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @hulakv, since this behaviour is controlled by the query executed (and so the error is returned from the query, not from the post-processing by sql_exporter), I'd say the solution is to update your query to something like this to exclude it on the query level (the expectation is that you have access to the default postgres database):

SELECT datname, pg_database_size(datname)
FROM pg_database
WHERE has_database_privilege(datname, 'CONNECT')
  AND datallowconn
  AND datistemplate = false
  AND datname NOT IN ('rdsadmin');

Try it out and let me know if it works?

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by burningalchemist
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants
Converted from issue

This discussion was converted from issue #764 on June 16, 2025 11:52.