prometheus.prometheus.postgres_exporter role – Prometheus PostgreSQL Exporter

Note

This role is part of the prometheus.prometheus collection (version 0.22.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install prometheus.prometheus.

To use it in a playbook, specify: prometheus.prometheus.postgres_exporter.

Entry point main – Prometheus PostgreSQL Exporter

Synopsis

Parameters

Parameter

Comments

postgres_exporter_basic_auth_users

dictionary

Dictionary of users and password for basic authentication. Passwords are automatically hashed with bcrypt.

postgres_exporter_binary_install_dir

string

Advanced

Directory to install postgres_exporter binary

Default: "/usr/local/bin"

postgres_exporter_binary_url

string

URL of the postgres_exporter binaries .tar.gz file

Default: "https://github.com/{{ _postgres_exporter_repo }}/releases/download/v{{ postgres_exporter_version }}/postgres_exporter-{{ postgres_exporter_version }}.{{ ansible_system | lower }}-{{ _postgres_exporter_go_ansible_arch }}.tar.gz"

postgres_exporter_checksums_url

string

URL of the postgres_exporter checksums file

Default: "https://github.com/{{ _postgres_exporter_repo }}/releases/download/v{{ postgres_exporter_version }}/sha256sums.txt"

postgres_exporter_config_dir

string

Path to directory with postgres_exporter configuration

Default: "/etc/postgres_exporter"

postgres_exporter_config_file

string

The filename of the postgres exporter config file

Default: "/etc/postgres_exporter/postgres_exporter.yml"

postgres_exporter_disabled_collectors

list / elements=string

List of disabled collectors.

By default postgres_exporter disables collectors listed here.

postgres_exporter_enabled_collectors

list / elements=string

List of dicts defining additionally enabled collectors and their configuration.

It adds collectors to those enabled by default.

Default: []

postgres_exporter_http_server_config

dictionary

Config for HTTP/2 support.

Keys and values are the same as in prometheus docs.

postgres_exporter_local_cache_path

string

Local path to stash the archive and its extraction

Default: "/tmp/postgres_exporter-{{ ansible_system | lower }}-{{ _postgres_exporter_go_ansible_arch }}/{{ postgres_exporter_version }}"

postgres_exporter_name

string

The target PostgreSQL URI

Default: "postgresql:///postgres?host=/var/run/postgresql"

postgres_exporter_password

string

The password for PostgreSQL password, required for postgres_exporter_uri

Default: "secret"

postgres_exporter_system_group

string

Advanced

System group for PostgreSQL Exporter

Default: "postgres-exp"

postgres_exporter_system_user

string

Advanced

PostgreSQL Exporter user

Default: "postgres-exp"

postgres_exporter_tls_server_config

dictionary

Configuration for TLS authentication.

Keys and values are the same as in prometheus docs.

postgres_exporter_uri

string

The target PostgreSQL, alternative format, single target only is supported. You should set postgres_exporter_name to empty string to use it. Read more here

postgres_exporter_username

string

The username for PostgreSQL login, required for postgres_exporter_uri

Default: "exporter"

postgres_exporter_version

string

PostgreSQL exporter package version. Also accepts latest as parameter.

Default: "0.15.0"

postgres_exporter_web_listen_address

string

Address on which postgres_exporter will listen

Default: "0.0.0.0:9187"

postgres_exporter_web_telemetry_path

string

Path under which to expose metrics

Default: "/metrics"

Authors

  • Prometheus Community