30 lines
806 B
YAML
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
|