a9e30382fe
Allow users to import custom grafana dashboards. Dashboards as JSON files should be placed into "{{ node_custom_config }}/grafana/dashboards/" folder. Change-Id: Id0f83b8d08541b3b74649f097b10c9450201b426
59 lines
1.9 KiB
Django/Jinja
59 lines
1.9 KiB
Django/Jinja
{
|
|
"command": "/usr/sbin/grafana-server --config=/etc/grafana/grafana.ini",
|
|
"config_files": [
|
|
{
|
|
"source": "{{ container_config_directory }}/grafana.ini",
|
|
"dest": "/etc/grafana/grafana.ini",
|
|
"owner": "grafana",
|
|
"perm": "0600"
|
|
},
|
|
{% if check_extra_conf_grafana is defined %}{% if check_extra_conf_grafana.matched > 0 %}{% for plugin in check_extra_conf_grafana.files %}
|
|
{
|
|
"source": "{{ container_config_directory }}/{{ plugin.path | basename }}",
|
|
"dest": "/etc/grafana/{{ plugin.path | basename }}",
|
|
"owner": "grafana",
|
|
"perm": "0600"
|
|
},
|
|
{% endfor %}{% endif %}{% endif %}
|
|
{
|
|
"source": "{{ container_config_directory }}/grafana_home_dashboard.json",
|
|
"dest": "/usr/share/grafana/public/dashboards/home.json",
|
|
"owner": "root",
|
|
"perm": "0644",
|
|
"optional": true
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/prometheus.yaml",
|
|
"dest": "/etc/grafana/provisioning/datasources/prometheus.yaml",
|
|
"owner": "root",
|
|
"perm": "0644",
|
|
"optional": true
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/provisioning.yaml",
|
|
"dest": "/etc/grafana/provisioning/dashboards/provisioning.yaml",
|
|
"owner": "root",
|
|
"perm": "0644"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/dashboards/",
|
|
"dest": "/var/lib/grafana/dashboards",
|
|
"owner": "grafana",
|
|
"perm": "0755",
|
|
"optional": true
|
|
}
|
|
],
|
|
"permissions": [
|
|
{
|
|
"path": "/var/lib/grafana",
|
|
"owner": "grafana:grafana",
|
|
"recurse": true
|
|
},
|
|
{
|
|
"path": "/var/log/kolla/grafana",
|
|
"owner": "grafana:grafana",
|
|
"recurse": true
|
|
}
|
|
]
|
|
}
|