{"id":13698565,"url":"https://github.com/percona/postgres_exporter","last_synced_at":"2025-05-04T03:31:44.379Z","repository":{"id":34998938,"uuid":"140572607","full_name":"percona/postgres_exporter","owner":"percona","description":"A PostgresSQL metric exporter for Prometheus","archived":false,"fork":true,"pushed_at":"2025-04-14T08:56:09.000Z","size":16180,"stargazers_count":17,"open_issues_count":14,"forks_count":12,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-04-14T09:47:56.683Z","etag":null,"topics":["pmm"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"prometheus-community/postgres_exporter","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/percona.png","metadata":{"files":{"readme":"README-RDS.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null}},"created_at":"2018-07-11T12:33:48.000Z","updated_at":"2025-04-14T08:56:15.000Z","dependencies_parsed_at":"2023-09-22T21:10:54.547Z","dependency_job_id":"c4e13fbc-07b8-486c-9788-d18cb570a062","html_url":"https://github.com/percona/postgres_exporter","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percona%2Fpostgres_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percona%2Fpostgres_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percona%2Fpostgres_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percona%2Fpostgres_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/percona","download_url":"https://codeload.github.com/percona/postgres_exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252283626,"owners_count":21723512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pmm"],"created_at":"2024-08-02T19:00:49.726Z","updated_at":"2025-05-04T03:31:39.370Z","avatar_url":"https://github.com/percona.png","language":"Go","funding_links":[],"categories":["Exporters"],"sub_categories":["Percona"],"readme":"# Using Postgres-Exporter with AWS:RDS\n\n### When using postgres-exporter with Amazon Web Services' RDS, the\n  rolname \"rdsadmin\" and datname \"rdsadmin\" must be excluded.\n\nI had success running docker container 'quay.io/prometheuscommunity/postgres-exporter:latest'\nwith queries.yaml as the PG_EXPORTER_EXTEND_QUERY_PATH.  errors\nmentioned in issue#335 appeared and I had to modify the\n'pg_stat_statements' query with the following:\n`WHERE t2.rolname != 'rdsadmin'`\n\nRunning postgres-exporter in a container like so:\n  ```\n  DBNAME='postgres'\n  PGUSER='postgres'\n  PGPASS='psqlpasswd123'\n  PGHOST='name.blahblah.us-east-1.rds.amazonaws.com'\n  docker run --rm --detach \\\n      --name \"postgresql_exporter_rds\" \\\n      --publish 9187:9187 \\\n      --volume=/etc/prometheus/postgresql-exporter/queries.yaml:/var/lib/postgresql/queries.yaml \\\n      -e DATA_SOURCE_NAME=\"postgresql://${PGUSER}:${PGPASS}@${PGHOST}:5432/${DBNAME}?sslmode=disable\" \\\n      -e PG_EXPORTER_EXCLUDE_DATABASES=rdsadmin \\\n      -e PG_EXPORTER_DISABLE_DEFAULT_METRICS=true \\\n      -e PG_EXPORTER_DISABLE_SETTINGS_METRICS=true \\\n      -e PG_EXPORTER_EXTEND_QUERY_PATH='/var/lib/postgresql/queries.yaml' \\\n      quay.io/prometheuscommunity/postgres-exporter\n  ```\n\n### Expected changes to RDS:\n+ see stackoverflow notes\n  (https://stackoverflow.com/questions/43926499/amazon-postgres-rds-pg-stat-statements-not-loaded#43931885)\n+ you must also use a specific RDS parameter_group that includes the following:\n  ```\n  shared_preload_libraries = \"pg_stat_statements,pg_hint_plan\"\n  ```\n+ lastly, you must reboot the RDS instance.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercona%2Fpostgres_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpercona%2Fpostgres_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercona%2Fpostgres_exporter/lists"}