ansible-role-prometheus-postgres
ansible-role-prometheus-postgres copied to clipboard
Prometheus Postgres exporter
Prometheus Postgres
Prometheus Postgres exporter.
This currently uses the local postgres administrator account on the PostgreSQL server.
In future this should be changed to use an unprivileged account.
See https://github.com/prometheus-community/postgres_exporter
Role Variables
All variables are optional:
prometheus_postgres_dbname: The database nameprometheus_postgres_data_source_name: impliesDATA_SOURCE_NAMEENV variable in the postgres_exporterprometheus_postgres_port: Serve metrics on this port, default9187prometheus_postgres_query_directory: the directory containing query files which will be loaded by the exporter, default isfiles/prometheus_postgres_query_filenames: A list of additional query files fromprometheus_postgres_query_directory, default[queries-default.yml]prometheus_postgres_version: thepostgres_exporterversion to be installed, default0.4.6prometheus_postgres_sha256: the SHA256 checksum of thepostgres_exporterbundle of versionprometheus_postgres_version, default:9ed457c9a6d3a1e0132b3fe10f1d072457a667b009993a73e90b47ca99cc5bcaprometheus_postgres_system_user: The OS user used to runpostgres_exporter, default:postgres(OS user is created only when differs from defaults).
Example playbook
- hosts: localhost
roles:
- role: ome.prometheus_postgres
prometheus_postgres_dbname: test