mbaran0v.ansible_role_prometheus_pgbouncer_exporter
Ansible 角色:prometheus-pgbouncer-exporter
这是一个用于 Prometheus PgBouncer exporter 的 Ansible 角色。目前,该角色适用于基于 Debian 和 RedHat 的 Linux 系统(仅支持 systemd)。已测试的平台包括:
- Ubuntu 16.04
- CentOS 7
要求
需要 Python3 和 pip;建议使用的 Python3 pip 安装角色:geerlingguy.pip
角色变量
可以传递给此角色的变量及其简要说明如下。(有关所有变量,请查看 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
# 环境变量列表
pgbouncer_exporter_env_variables:
- PGBOUNCER_PASS=passw0rd!
# pgbouncer 支持环境变量替换
# 即。$(PGBOUNCER_PASS) 被替换为 "PGBOUNCER_PASS" 环境变量的内容
pgbouncer_exporter_pgbouncers:
- dsn: postgresql://pgbouncer:$(PGBOUNCER_PASS)@127.0.0.1:5432/pgbouncer
connect_timeout: 5
include_databases: []
exclude_databases:
- pgbouncer
依赖
无
示例剧本
包含一个如何使用此角色的示例(例如,作为参数传入变量)对用户来说也是很有帮助的:
- 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
许可证
MIT / BSD
作者信息
此角色由 Maxim Baranov 于 2019 年创建。
关于项目
Prometheus PgBouncer exporter https://github.com/spreaker/prometheus-pgbouncer-exporter
安装
ansible-galaxy install mbaran0v.ansible_role_prometheus_pgbouncer_exporter
许可证
Unknown
下载
76
拥有者
Experienced DevOps Engineer