ansible/monitoring.yml

144 lines
4.3 KiB
YAML
Raw Normal View History

2020-05-03 18:45:07 +02:00
#!/usr/bin/env ansible-playbook
2019-05-05 14:07:04 +02:00
---
- hosts: prometheus-fleming.adm.auro.re
2019-07-26 22:47:10 +02:00
vars:
2019-11-01 15:38:35 +01:00
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
2019-11-01 19:02:21 +01:00
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
2021-03-10 12:58:51 +01:00
snmp_switch_community: "{{ vault_snmp_switch_community }}"
2019-11-01 15:38:35 +01:00
2019-07-26 22:47:10 +02:00
# Prometheus targets.json
prometheus_targets:
2019-11-01 15:17:59 +01:00
- targets: |
{{ groups['fleming_pve'] + groups['fleming_vm'] | list | sort }}
2019-11-01 14:16:32 +01:00
prometheus_unifi_snmp_targets:
2019-11-01 15:17:59 +01:00
- targets: "{{ groups['fleming_unifi'] | list | sort }}"
2019-07-26 22:47:10 +02:00
roles:
- prometheus
2021-01-22 18:20:13 +01:00
- hosts: prometheus-pacaterie.adm.auro.re
2019-05-05 14:07:04 +02:00
vars:
2019-11-01 15:38:35 +01:00
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
2019-11-01 19:02:21 +01:00
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
2021-03-10 12:58:51 +01:00
snmp_switch_community: "{{ vault_snmp_switch_community }}"
2019-11-01 15:38:35 +01:00
2019-05-05 14:07:04 +02:00
# Prometheus targets.json
prometheus_targets:
2019-11-01 15:17:59 +01:00
- targets: |
{{ groups['pacaterie_pve'] + groups['pacaterie_vm'] | list | sort }}
2019-11-01 14:16:32 +01:00
prometheus_unifi_snmp_targets:
2019-11-01 15:17:59 +01:00
- targets: "{{ groups['pacaterie_unifi'] | list | sort }}"
2021-01-22 18:20:13 +01:00
prometheus_ups_snmp_targets:
2021-01-29 20:12:14 +01:00
- ups-pn-1.ups.auro.re
2021-03-10 12:53:28 +01:00
- ups-ps-1.ups.auro.re
2019-11-01 15:17:59 +01:00
roles:
2021-01-29 20:12:14 +01:00
- prometheus
2019-11-01 15:17:59 +01:00
- hosts: prometheus-edc.adm.auro.re
2019-11-01 15:17:59 +01:00
vars:
2019-11-01 15:38:35 +01:00
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
2019-11-01 19:02:21 +01:00
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
2021-03-10 12:58:51 +01:00
snmp_switch_community: "{{ vault_snmp_switch_community }}"
2019-11-01 15:38:35 +01:00
2019-11-01 15:17:59 +01:00
# Prometheus targets.json
prometheus_ups_snmp_targets:
2021-01-29 20:12:14 +01:00
- ups-ec-1.ups.auro.re
2021-03-10 12:53:28 +01:00
- ups-ec-2.ups.auro.re
2019-11-01 15:17:59 +01:00
prometheus_targets:
- targets: |
{{ groups['edc_pve'] + groups['edc_vm'] | list | sort }}
2019-11-01 15:17:59 +01:00
prometheus_unifi_snmp_targets:
- targets: "{{ groups['edc_unifi'] | list | sort }}"
roles:
- prometheus
- hosts: prometheus-gs.adm.auro.re
2019-11-01 15:17:59 +01:00
vars:
2019-11-01 15:38:35 +01:00
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
2019-11-01 19:02:21 +01:00
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
2021-03-10 12:58:51 +01:00
snmp_switch_community: "{{ vault_snmp_switch_community }}"
2019-11-01 15:38:35 +01:00
2019-11-01 15:17:59 +01:00
# Prometheus targets.json
prometheus_targets:
- targets: |
{{ groups['gs_pve'] + groups['gs_vm'] | list | sort }}
2019-11-01 15:17:59 +01:00
prometheus_unifi_snmp_targets:
- targets: "{{ groups['gs_unifi'] | list | sort }}"
2021-01-26 19:18:35 +01:00
prometheus_ups_snmp_targets:
- ups-gk-1.ups.auro.re
2019-05-05 14:07:04 +02:00
roles:
- prometheus
2021-01-23 19:01:27 +01:00
- hosts: prometheus-rives.adm.auro.re
vars:
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
2021-03-10 12:58:51 +01:00
snmp_switch_community: "{{ vault_snmp_switch_community }}"
2021-01-23 19:01:27 +01:00
# Prometheus targets.json
prometheus_ups_snmp_targets:
2021-01-29 20:12:14 +01:00
- ups-r3-1.ups.auro.re
2021-01-23 19:01:27 +01:00
prometheus_targets:
- targets: |
{{ groups['rives_pve'] + groups['rives_vm'] | list | sort }}
prometheus_unifi_snmp_targets:
- targets: "{{ groups['rives_unifi'] | list | sort }}"
roles:
- prometheus
- hosts: prometheus-aurore.adm.auro.re
vars:
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
snmp_switch_community: "{{ vault_snmp_switch_community }}"
# Prometheus targets.json
prometheus_targets:
- targets: |
{{ groups['aurore_pve'] + groups['aurore_vm'] | list | sort }}
prometheus_switch_snmp_targets:
- targets:
- yggdrasil.switch.auro.re
roles:
- prometheus
2021-02-10 18:40:28 +01:00
- hosts: prometheus-ovh.adm.auro.re
vars:
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
snmp_switch_community: "{{ vault_snmp_switch_community }}"
2021-02-10 18:40:28 +01:00
# Prometheus targets.json
prometheus_targets:
- targets: |
{{ groups['ovh_pve'] + groups['ovh_vm'] | list | sort }}
2021-02-10 19:06:28 +01:00
prometheus_docker_targets:
- docker-ovh.adm.auro.re:8087
2021-02-10 18:40:28 +01:00
roles:
- prometheus
2021-01-23 19:01:27 +01:00
- hosts: prometheus-federate.adm.auro.re
vars:
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
# Prometheus targets.json
prometheus_targets:
- prometheus-edc.adm.auro.re
- prometheus-gs.adm.auro.re
- prometheus-fleming.adm.auro.re
- prometheus-pacaterie.adm.auro.re
- prometheus-rives.adm.auro.re
2021-02-10 20:42:37 +01:00
- prometheus-aurore.adm.auro.re
- prometheus-ovh.adm.auro.re
roles:
- prometheus_federate
2019-05-05 14:07:04 +02:00
# Monitor all hosts
- hosts: all,!edc_unifi,!fleming_unifi,!pacaterie_unifi,!gs_unifi,!rives_unifi,!aurore_testing_vm,!ovh_container
2019-05-05 14:07:04 +02:00
roles:
2020-11-04 19:36:40 +01:00
- prometheus_node