Global_monitoring #24

Merged
otthorn merged 12 commits from Global_monitoring into master 2021-02-18 18:03:05 +01:00
3 changed files with 13 additions and 0 deletions
Showing only changes of commit 4308bedf8f - Show all commits

View file

@ -101,6 +101,8 @@
prometheus_targets: prometheus_targets:
- targets: | - targets: |
{{ groups['ovh_pve'] + groups['ovh_vm'] | list | sort }} {{ groups['ovh_pve'] + groups['ovh_vm'] | list | sort }}
prometheus_docker_targets:
- targets: docker-ovh.adm.auro.re:8087
roles: roles:
- prometheus - prometheus

View file

@ -64,6 +64,13 @@
mode: 0644 mode: 0644
when: prometheus_ups_snmp_targets is defined when: prometheus_ups_snmp_targets is defined
- name: Configure Prometheus docker monitoring
copy:
content: "{{ [{'targets': prometheus_docker_targets }] | to_nice_json }}\n"
dest: /etc/prometheus/targets_docker.json
mode: 0644
when: prometheus_docker_targets is defined
- name: Activate prometheus service - name: Activate prometheus service
systemd: systemd:
name: prometheus name: prometheus

View file

@ -81,3 +81,7 @@ scrape_configs:
- target_label: __address__ - target_label: __address__
replacement: 127.0.0.1:9116 replacement: 127.0.0.1:9116
- job_name: docker
file_sd_configs:
- files:
- '/etc/prometheus/targets_docker.json'