No description
  • Shell 47.1%
  • Jinja 32.9%
  • Just 20%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-02 01:42:48 +00:00
.github CI: test on ubuntu2604 only 2026-08-27 07:43:14 +03:00
assets Make the project compliant with REUSE 2025-04-29 19:28:32 +03:00
bin Replace the autotag workflow with a version-derived tagger 2026-08-24 03:36:46 +03:00
defaults Rename prometheus_postgres_exporter_container_labels_metrics_* 2026-10-20 02:54:48 -07:00
LICENSES Make the project compliant with REUSE 2025-04-29 19:28:32 +03:00
meta Standardize the meta namespace to mash 2026-08-24 18:07:07 +03:00
molecule Update dependency ansible-role-postgres to v18.6-11 2026-11-02 01:42:48 +00:00
tasks Rename prometheus_postgres_exporter_container_labels_metrics_* 2026-10-20 02:54:48 -07:00
templates Rename prometheus_postgres_exporter_container_labels_metrics_* 2026-10-20 02:54:48 -07:00
vars Make the project compliant with REUSE 2025-04-29 19:28:32 +03:00
.ansible-lint Update pre-commit 2025-05-29 20:25:15 +09:00
.gitignore Add Molecule testing framework 2026-07-22 11:47:17 -04:00
.pre-commit-config.yaml Update pre-commit repositories and hooks 2026-10-29 06:46:29 -08:00
.python-version Add Molecule testing framework 2026-07-22 11:47:17 -04:00
.yamllint.yml Update pre-commit 2025-05-29 20:25:15 +09:00
justfile Update justfile: git hooks resolve prek through the mise shim 2026-08-25 11:21:48 -04:00
LICENSE Initial commit 2023-02-05 10:26:04 +02:00
mise.toml mise: drop the settings block - yes is ignored in project configs 2026-08-16 09:28:10 +03:00
README.md Update README.md: add a section about releases 2026-10-02 02:57:17 -04:00
REUSE.toml Add Molecule testing framework 2026-07-22 11:47:17 -04:00

Prometheus Postgres Exporter Ansible role

This is an Ansible role which installs Prometheus Postgres Exporter to run as a Docker container wrapped in a systemd service.

This role implicitly depends on:

Check defaults/main.yml for the full list of supported options.

💡 For an Ansible playbook which integrates this role and makes it easier to use, see the Mother-of-All-Self-Hosting Ansible playbook.

Integrate with Grafana

You can use the dashboard 9628 to visualize the data in Grafana. The variable prometheus_postgres_exporter_dashboard_urls might help you.

A grafana dashboard showing connection data, commits to the database and more

Development

pre-commit

You can optionally install a Git pre-commit hook (via mise + prek) that runs formatting and linting checks before each commit. See .pre-commit-config.yaml for which hooks are to be executed.

To install the hook, run the just command below:

just prek-install-git-pre-commit-hook

Molecule

This role supports Molecule, an Ansible testing framework designed for developing and testing Ansible collections, playbooks, and roles.

Refer to this page for details about how to utilize it.

Releases

Tags are created on the GitHub workflow by .github/workflows/autotag.yml, which asks bin/compute-next-tag.sh what the commit on main should be released as. The answer comes from the version pinned in defaults/main.yml and from the tags that already exist, so a commit that only touches documentation or CI is not released at all, and any change to the role itself is — without waiting for a dependency bump to carry it along.

bin/test-compute-next-tag.sh exercises that script against throwaway repositories, and runs as a prek hook.