Add configuration for Postgres Prom exporter
This commit is contained in:
parent
258b5792da
commit
c7d914696b
|
@ -21,6 +21,11 @@
|
||||||
state: restarted
|
state: restarted
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: restart prometheus-postgres
|
||||||
|
service:
|
||||||
|
name: prometheus-postgres-exporter
|
||||||
|
state: restarted
|
||||||
|
|
||||||
- name: restart keydb
|
- name: restart keydb
|
||||||
service:
|
service:
|
||||||
name: keydb-server
|
name: keydb-server
|
||||||
|
|
|
@ -46,6 +46,17 @@
|
||||||
until: apt_res is success
|
until: apt_res is success
|
||||||
when: enable_prometheus_exporters is defined and enable_prometheus_exporters
|
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
|
- name: stop and disable postgresql
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
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