Add grafana install with dashboards provisioning depending on the exporters configured #1

Merged
tchivert merged 8 commits from add_grafana_compose into master 2023-03-13 16:38:00 +01:00
2 changed files with 17 additions and 2 deletions
Showing only changes of commit 174b541cd5 - Show all commits

View File

@ -7,8 +7,10 @@
## prometheus server install
- name: 'server install'
include_tasks: server/grafana-prometheus.yml
include_tasks: server/grafana-provisioning.yml
include_tasks: "server/{{ item }}"
loop:
- grafana-prometheus.yml
- grafana-provisioning.yml
when:
- prometheus_server_enable == "true"
tags:

View File

@ -12,6 +12,19 @@
when: grafana_provisioned_datasources_path is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | create grafana provisioning directories"
file:
path: "/opt/docker-compose/grafana-prometheus/{{ item }}"
state: directory
owner: '1000'
group: '1000'
mode: '0755'
loop:
- datasources
- dashboards
when: grafana_provisioned_datasources_path is not defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana provisioned datasources conf"
copy:
src: dashboards/datasources.yaml