blob: 7e8fb680034fc380c28f56f034065e8b200d7f8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
---
- name: install prometheus node exporter
become: yes
apt: name="prometheus-node-exporter"
- name: ensure prometheus node exporter is started
become: yes
systemd: name="prometheus-node-exporter.service" enabled="yes" state="started"
# Optional per-service exporters, both in 26.04 apt (verified: nginx 1.5.1,
# postgres 0.19.0). Uncomment to deploy.
# # Nginx
# - name: check if running nginx
# stat: path="/etc/nginx/"
# register: stat_nginx_conf
# - name: install prometheus nginx exporter
# become: yes
# apt: name="prometheus-nginx-exporter"
# when: stat_nginx_conf.stat.exists
# - name: ensure prometheus nginx exporter is started
# become: yes
# systemd: name="prometheus-nginx-exporter.service" enabled="yes" state="started"
# when: stat_nginx_conf.stat.exists
# # PostgreSQL
# - name: check if running postgresql
# stat: path="/etc/postgresql/"
# register: stat_postgresql_conf
# - name: install prometheus postgres exporter
# become: yes
# apt: name="prometheus-postgres-exporter"
# when: stat_postgresql_conf.stat.exists
# - name: ensure prometheus postgres exporter is started
# become: yes
# systemd: name="prometheus-postgres-exporter.service" enabled="yes" state="started"
# when: stat_postgresql_conf.stat.exists
|