Merge "Extend support for custom Grafana dashboards"
This commit is contained in:
commit
6ea8390a12
@ -139,26 +139,12 @@
|
|||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
|
|
||||||
- name: Create custom Grafana dashboards folder
|
|
||||||
become: true
|
|
||||||
vars:
|
|
||||||
service: "{{ grafana_services['grafana'] }}"
|
|
||||||
file:
|
|
||||||
dest: "{{ node_config_directory }}/grafana/dashboards/"
|
|
||||||
state: "directory"
|
|
||||||
mode: "0770"
|
|
||||||
when:
|
|
||||||
- grafana_custom_dashboards_folder.stat.exists
|
|
||||||
- grafana_custom_dashboards_folder.stat.isdir
|
|
||||||
- inventory_hostname in groups[service.group]
|
|
||||||
- service.enabled | bool
|
|
||||||
|
|
||||||
- name: Copying over custom dashboards
|
- name: Copying over custom dashboards
|
||||||
vars:
|
vars:
|
||||||
service: "{{ grafana_services['grafana'] }}"
|
service: "{{ grafana_services['grafana'] }}"
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item }}"
|
src: "{{ node_custom_config }}/grafana/dashboards"
|
||||||
dest: "{{ node_config_directory }}/grafana/dashboards/"
|
dest: "{{ node_config_directory }}/grafana/"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
@ -166,7 +152,5 @@
|
|||||||
- grafana_custom_dashboards_folder.stat.isdir
|
- grafana_custom_dashboards_folder.stat.isdir
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
with_fileglob:
|
|
||||||
- "{{ node_custom_config }}/grafana/dashboards/*.json"
|
|
||||||
notify:
|
notify:
|
||||||
- Restart grafana container
|
- Restart grafana container
|
||||||
|
@ -35,9 +35,11 @@ Custom dashboards provisioning
|
|||||||
|
|
||||||
Kolla Ansible sets custom dashboards provisioning using `Dashboard provider <https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards>`_.
|
Kolla Ansible sets custom dashboards provisioning using `Dashboard provider <https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards>`_.
|
||||||
|
|
||||||
Dashboard's JSON files should be placed into
|
Dashboard JSON files should be placed into the
|
||||||
``{{ node_custom_config }}/grafana/dashboards/`` folder.
|
``{{ node_custom_config }}/grafana/dashboards/`` folder. The use of
|
||||||
Dashboards will be imported to Grafana dashboards General Folder.
|
sub-folders is also supported when using a custom ``provisioning.yaml``
|
||||||
|
file. Dashboards will be imported into the Grafana dashboards 'General'
|
||||||
|
folder by default.
|
||||||
|
|
||||||
Grafana provisioner config can be altered by placing ``provisioning.yaml`` to
|
Grafana provisioner config can be altered by placing ``provisioning.yaml`` to
|
||||||
``{{ node_custom_config }}/grafana/`` folder.
|
``{{ node_custom_config }}/grafana/`` folder.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user