{"id":13461490,"url":"https://github.com/prometheus-community/postgres_exporter","last_synced_at":"2025-05-12T05:18:59.275Z","repository":{"id":37446611,"uuid":"41317079","full_name":"prometheus-community/postgres_exporter","owner":"prometheus-community","description":"A PostgreSQL metric exporter for Prometheus","archived":false,"fork":false,"pushed_at":"2025-05-07T02:15:45.000Z","size":7618,"stargazers_count":3044,"open_issues_count":318,"forks_count":769,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-05-11T02:57:49.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prometheus-community.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":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-08-24T17:26:27.000Z","updated_at":"2025-05-10T06:04:09.000Z","dependencies_parsed_at":"2023-10-02T12:58:56.696Z","dependency_job_id":"9f562570-b2a2-4bcb-91aa-a8e47ba75c1d","html_url":"https://github.com/prometheus-community/postgres_exporter","commit_stats":{"total_commits":438,"total_committers":144,"mean_commits":"3.0416666666666665","dds":0.730593607305936,"last_synced_commit":"a4ac0e674769805a9b282edb9a7791e64cd977e3"},"previous_names":["wrouesnel/postgres_exporter"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fpostgres_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fpostgres_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fpostgres_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-community%2Fpostgres_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prometheus-community","download_url":"https://codeload.github.com/prometheus-community/postgres_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253509775,"owners_count":21919588,"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":[],"created_at":"2024-07-31T11:00:40.577Z","updated_at":"2025-05-11T02:58:02.270Z","avatar_url":"https://github.com/prometheus-community.png","language":"Go","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","funding_links":[],"categories":["Go","Databases","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-community%2Fpostgres_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprometheus-community%2Fpostgres_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-community%2Fpostgres_exporter/lists"}