using grafana/grafana docker image for stored local dashboards but its not picking up
also there are two provisioning folders in grafana/grafana image
which folder is used for container as docs not having info about container config
58c65e422979:/etc/grafana/provisioning$
58c65e422979:/usr/share/grafana/conf/provisioning/dashboards$ cat sample.yaml
# # config file version
apiVersion: 1
..
# path: /var/lib/grafana/dashboards
==========================================
58c65e422979:/etc/grafana/provisioning/dashboards$ ls
all.yml
58c65e422979:/etc/grafana/provisioning/dashboards$ cat all.yml
apiVersion: 1
providers:
- name: dashboards
type: file
updateIntervalSeconds: 30
options:
path: /var/lib/grafana/dashboards
foldersFromFilesStructure: true
58c65e422979:/etc/grafana/provisioning/dashboards$ ls /var/lib/grafana/dashboards/
myapp_dashboard.json process_cpu_seconds.json
58c65e422979:/etc/grafana/provisioning/dashboards$
these dashboards are not showing up ,these are mounted from local volume in docker compose (grafana/grafana docker image)
$ grafana-server --version
Version 10.0.2 (commit: b2bbe10fbc, branch: HEAD)
welcome @systems110
According to the file system of my OS (ubuntu) the folder you need to provision is actually /etc/grafana/
…
the following provisioning template worked for me okay.
the file location is ./my_grafana/provisioning/dashboards
apiVersion: 1
providers:
- name: 'test'
orgId: 1
folder: 'folder_2'
type: 'file'
updateIntervalSeconds: 30
options:
path: /etc/grafana/provisioning/dashboards
Test it:
docker run -v ./my_grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards -p 3000:3000 -e GF_LOG_MODE=console grafana/grafana
Hope it helps
1 Like
thanks that change path helped
wsl2 ubuntu image
updated to single yml file /etc/grafana/provisioning/dashboards/dashboard.yml
with path to /etc/grafana/provisioning/dashboards
and *.json files in /etc/grafana/provisioning/dashboards are loading
default grafana/grafana container image has two provisioning folders
8ff09b434089:/usr/share/grafana/conf/provisioning$ ls -l
total 24
drwxr-xr-x 2 root root 4096 Jul 10 18:14 access-control
drwxr-xr-x 2 root root 4096 Jul 10 18:14 alerting
drwxr-xr-x 2 root root 4096 Jul 10 18:14 dashboards
drwxr-xr-x 2 root root 4096 Jul 10 18:14 datasources
drwxr-xr-x 2 root root 4096 Jul 10 18:14 notifiers
drwxr-xr-x 2 root root 4096 Jul 10 18:14 plugins
8ff09b434089:/usr/share/grafana/conf/provisioning$ ls -l /etc/grafana/provisioning/
total 24
drwxrwxrwx 2 grafana root 4096 Jul 10 18:14 access-control
drwxrwxrwx 2 grafana root 4096 Jul 10 18:14 alerting
drwxr-xr-x 2 1000 1000 4096 Jul 24 18:46 dashboards
drwxrwxrwx 2 grafana root 4096 Jul 10 18:14 datasources
drwxrwxrwx 2 grafana root 4096 Jul 10 18:14 notifiers
drwxrwxrwx 2 grafana root 4096 Jul 10 18:14 plugins
1 Like