ansible/monitoring.yml

196 lines
6.2 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 }}"
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
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 }}"
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
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 }}"
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
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
2021-04-07 16:55:35 +02:00
- ups-ec-3.ups.auro.re
2019-11-01 15:17:59 +01:00
prometheus_targets:
- targets: |
2021-05-04 00:51:25 +02:00
{{ groups['edc_pve'] + groups['edc_vm'] + groups['edc_server'] | list | sort }}
2021-09-08 12:06:56 +02:00
prometheus_ipmi_targets:
- targets: |
{{ groups['edc_pve'] + groups['edc_server'] | 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 }}"
2021-08-20 16:58:28 +02:00
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
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
2021-08-20 16:58:28 +02:00
prometheus_pdu_snmp_targets:
2021-08-20 12:17:17 +02:00
- pdu-ga-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 }}"
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
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-04-10 16:58:48 +02:00
- ups-r1-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 }}"
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
# Prometheus targets.json
prometheus_targets:
- targets: |
{{ groups['aurore_pve'] + groups['aurore_vm'] | list | sort }}
prometheus_postgres_targets:
2021-04-11 21:32:20 +02:00
- targets: |
{{ groups['bdd'] + groups['radius'] | list | sort }}
prometheus_switch_snmp_targets:
- targets:
- yggdrasil.switch.auro.re
2021-03-14 10:19:55 +01:00
- sw-pn-serveurs.switch.auro.re
- sw-ec-serveurs.switch.auro.re
- sw-gk-serveurs.switch.auro.re
- sw-fl-serveurs.switch.auro.re
- sw-ff-uplink.switch.auro.re
- sw-fl-core.switch.auro.re
- sw-fd-vcore.switch.auro.re
- sw-fl-vcore.switch.auro.re
- sw-ff-vcore.switch.auro.re
- sw-pn-core.switch.auro.re
- sw-ec-core.switch.auro.re
- sw-gk-core.switch.auro.re
- sw-r3-core.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 }}"
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
2021-02-10 18:40:28 +01:00
# Prometheus targets.json
prometheus_targets:
2021-04-12 10:03:53 +02:00
- targets: |
2021-04-11 22:04:05 +02:00
{{ groups['ovh_pve'] + groups['ovh_vm'] | list | sort }}
prometheus_postgres_targets:
2021-04-12 10:01:39 +02:00
- targets:
- bdd-ovh.adm.auro.re
2021-02-10 19:06:28 +01:00
prometheus_docker_targets:
2021-04-14 20:11:23 +02:00
- docker-ovh.adm.auro.re
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 }}"
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
2021-04-12 10:01:39 +02:00
# 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
2021-04-12 10:01:39 +02:00
# Postgres Exporters
- hosts: bdd,radius
2021-04-10 17:29:50 +02:00
roles:
- prometheus_postgres
2021-09-08 11:53:20 +02:00
# IPMI Exporters
- hosts: server,pve
roles:
- prometheus_ipmi
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