ansible_role_prometheus_pgbouncer_exporter

Ansible role: prometheus-pgbouncer-exporter

Build Status License GitHub tag Open Source Love svg1 PRs Welcome

Ansible role for Prometheus PgBouncer exporter. Currently this works on Debian and RedHat based linux systems (only systemd support). Tested platforms are:

  • Ubuntu 16.04
  • CentOS 7

Requirements

Requires Python3 and pip; recommended role for Python3 pip installation: geerlingguy.pip

Role Variables

The variables that can be passed to this role and a brief description about them are as follows. (For all variables, take a look at defaults/main.yml)

pgbouncer_exporter_version: 2.0.1
pgbouncer_exporter_host: 127.0.0.1
pgbouncer_exporter_port: 9127
pgbouncer_exporter_log_level: INFO

# list of environment variables
pgbouncer_exporter_env_variables:
  - PGBOUNCER_PASS=passw0rd!

# pgbouncer supports environment variables replacement
# Ie. $(PGBOUNCER_PASS) is replaced with the content of "PGBOUNCER_PASS" environment variable
pgbouncer_exporter_pgbouncers:
  - dsn: postgresql://pgbouncer:$(PGBOUNCER_PASS)@127.0.0.1:5432/pgbouncer
    connect_timeout: 5
    include_databases: []
    exclude_databases:
      - pgbouncer

Dependencies

None

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: prometheus-pgbouncer-exporter
  roles:
    - role: geerlingguy.repo-epel
      when: ansible_os_family == 'RedHat'
    - role: geerlingguy.pip
      pip_package: python36-pip
      when: ansible_os_family == 'RedHat'
    - role: geerlingguy.pip
      pip_package: python3-pip
      when: ansible_os_family == 'Debian'
    - role: mbaran0v.prometheus-pgbouncer-exporter

License

MIT / BSD

Author Information

This role was created in 2019 by Maxim Baranov.

About

Prometheus PgBouncer exporter https://github.com/spreaker/prometheus-pgbouncer-exporter

Install
ansible-galaxy install mbaran0v/ansible-role-prometheus-pgbouncer-exporter
GitHub repository
License
Unknown
Downloads
63
Owner
Experienced DevOps Engineer