285 lines
9.3 KiB
YAML
285 lines
9.3 KiB
YAML
# - 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"
|
|
|
|
- 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.j2
|
|
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.j2
|
|
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.j2
|
|
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.j2
|
|
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.j2
|
|
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 docker dashboard"
|
|
copy:
|
|
src: dashboards/docker.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/docker.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: prometheus_cadvisor_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana opensearch dashboard"
|
|
copy:
|
|
src: dashboards/opensearch.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/opensearch.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: prometheus_opensearch_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana haproxy dashboard"
|
|
copy:
|
|
src: dashboards/haproxy.json.j2
|
|
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.j2
|
|
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.j2
|
|
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.j2
|
|
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.j2
|
|
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.j2
|
|
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.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: >
|
|
prometheus_node_exporter_targets is defined and
|
|
prometheus_cloudflare_exporter_targets is not defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana overview-cf dashboard"
|
|
copy:
|
|
src: dashboards/overview-cf.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: >
|
|
prometheus_node_exporter_targets is defined and
|
|
prometheus_cloudflare_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana plateform-overview dashboard"
|
|
copy:
|
|
src: dashboards/plateform-overview.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: >
|
|
prometheus_node_exporter_targets is defined and
|
|
prometheus_cloudflare_exporter_targets is not defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana plateform-overview-cf dashboard"
|
|
copy:
|
|
src: dashboards/plateform-overview-cf.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: >
|
|
prometheus_node_exporter_targets is defined and
|
|
prometheus_cloudflare_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana phpfpm dashboard"
|
|
copy:
|
|
src: dashboards/phpfpm.json.j2
|
|
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.j2
|
|
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.j2
|
|
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.j2
|
|
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"
|
|
|
|
- name: "grafana-prometheus | import grafana gitlab dashboard"
|
|
copy:
|
|
src: dashboards/gitlab.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/gitlab.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: prometheus_gitlab_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana postgresql dashboard"
|
|
copy:
|
|
src: dashboards/postgresql.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/postgresql.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: prometheus_postgres_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana kong dashboard"
|
|
copy:
|
|
src: dashboards/kong.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/kong.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: prometheus_kong_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|
|
|
|
- name: "grafana-prometheus | import grafana nginx dashboard"
|
|
copy:
|
|
src: dashboards/nginx.json.j2
|
|
dest: /opt/docker-compose/grafana-prometheus/dashboards/nginx.json
|
|
owner: '1000'
|
|
group: '1000'
|
|
mode: '0750'
|
|
when: prometheus_nginx_exporter_targets is defined
|
|
notify: "grafana-prometheus-restart"
|