2023-02-10 11:13:37 +01:00
|
|
|
- name: "grafana-prometheus | import grafana provisioned datasources"
|
|
|
|
synchronize:
|
|
|
|
src: "{{ grafana_provisioned_datasources_path }}"
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/
|
|
|
|
when: grafana_provisioned_datasources_path is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana provisioned dashboards"
|
|
|
|
synchronize:
|
|
|
|
src: "{{ grafana_provisioned_dashboards_path }}"
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/
|
|
|
|
when: grafana_provisioned_datasources_path is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
2023-02-10 14:10:21 +01:00
|
|
|
- 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"
|
|
|
|
|
2023-02-10 11:13:37 +01:00
|
|
|
- name: "grafana-prometheus | import grafana provisioned datasources conf"
|
|
|
|
copy:
|
|
|
|
src: dashboards/datasources.yaml
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/datasources/datasources.yaml
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: grafana_provisioned_datasources_path is not defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana provisioned dashboards conf"
|
|
|
|
copy:
|
|
|
|
src: dashboards/dashboard.yaml
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/dashboard.yaml
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: grafana_provisioned_dashboards_path is not defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana apache dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/apache.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/apache.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_apache_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana cloudflare dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/cloudflare.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/cloudflare.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_cloudflare_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana docker dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/docker.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/docker.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_docker_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana haproxy dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/haproxy.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/haproxy.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_haproxy_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana memcached dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/memcached.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/memcached.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_memcached_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana mysqld dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/mysqld.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/mysqld.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_mysqld_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana network dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/network.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/network.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_node_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana node-exporter dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/node-exporter.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/node-exporter.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_node_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana opcache dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/opcache.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/opcache.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_opcache_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana overview dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/overview.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_node_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana plateform-overview dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/plateform-overview.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_node_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana phpfpm dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/phpfpm.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/phpfpm.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_phpfpm_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana proxmox dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/proxmox.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/proxmox.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_proxmox_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana redis dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/redis.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/redis.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_redis_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
|
|
|
|
- name: "grafana-prometheus | import grafana varnish dashboard"
|
|
|
|
copy:
|
|
|
|
src: dashboards/varnish.json
|
|
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/varnish.json
|
|
|
|
owner: '1000'
|
|
|
|
group: '1000'
|
|
|
|
mode: '0750'
|
|
|
|
when: prometheus_varnish_exporter_targets is defined
|
|
|
|
notify: "grafana-prometheus-restart"
|