Add configuration for Postgres Prom exporter
This commit is contained in:
parent
258b5792da
commit
c7d914696b
|
@ -21,6 +21,11 @@
|
|||
state: restarted
|
||||
ignore_errors: yes
|
||||
|
||||
- name: restart prometheus-postgres
|
||||
service:
|
||||
name: prometheus-postgres-exporter
|
||||
state: restarted
|
||||
|
||||
- name: restart keydb
|
||||
service:
|
||||
name: keydb-server
|
||||
|
|
|
@ -46,6 +46,17 @@
|
|||
until: apt_res is success
|
||||
when: enable_prometheus_exporters is defined and enable_prometheus_exporters
|
||||
|
||||
- name: install Prometheus postgresql exporter config if enabled
|
||||
template:
|
||||
src: patroni/prometheus.env.j2
|
||||
dest: /etc/default/prometheus-postgres-exporter
|
||||
owner: prometheus
|
||||
group: prometheus
|
||||
mode: 0640
|
||||
notify:
|
||||
- restart prometheus-postgres
|
||||
when: enable_prometheus_exporters is defined and enable_prometheus_exporters
|
||||
|
||||
- name: stop and disable postgresql
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# Prometheus Postgres exporter configuration
|
||||
# {{ ansible_managed }}
|
||||
|
||||
DATA_SURCE_NAME="host=/run/postgresql dbname=postgres"
|
||||
ARGS=""
|
Loading…
Reference in New Issue