ansible/monitoring.yml
2019-07-26 22:47:10 +02:00

30 lines
806 B
YAML

---
# Deploy Prometheus
- hosts: prometheus-fleming.adm.auro.re
vars:
# Prometheus targets.json
prometheus_targets:
- labels: {job: node}
targets: "{{ groups['fleming'] | map('replace', '.re', '.re:9100') | list | sort }}"
- labels: {job: prometheus}
targets: ['localhost:9090']
roles:
- prometheus
- prometheus-alertmanager
- hosts: prometheus-pacaterie.adm.auro.re
vars:
# Prometheus targets.json
prometheus_targets:
- labels: {job: node}
targets: "{{ groups['pacaterie'] | map('replace', '.re', '.re:9100') | list | sort }}"
- labels: {job: prometheus}
targets: ['localhost:9090']
roles:
- prometheus
- prometheus-alertmanager
# Monitor all hosts
- hosts: fleming,pacaterie
roles:
- prometheus-node