Grafana version : 12.4.0
I’m trying to find a way to provision the default home dashboard using git sync with pure git
For now i was on provisionned dashboards, my workflow was dashboards on git → on my machine git pull → restart of the container. Default home dashboard was set to point on a local dashboard. But now, i’m testing git sync with pure git but don’t know how to set the default home dashboard to point to the git synced dash.
Hi,
The default home path does not works as my git sync folder begins with my project name. For example : dashboards/f/ProjectName/home.json.
I’d like to know the best way to manage this. For now, my config is :
Project in git
Grafana as a docker container
On the VM, project git cloned.
In the custom.ini :
Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + “dashboards/home.json”
default_home_dashboard_path = /etc/grafana/provisioning/dashboards/global-view.json
In the docker-compose file :
grafana:
image: grafana/grafana:12.4.0
container_name: grafana
restart: on-failure
ports:
- ‘3000:3000’
volumes: - ./etc/grafana/config/custom.ini:/etc/grafana/grafana.ini:rw
- ./etc/grafana/provisioning/:/etc/grafana/provisioning/ #volume where static dashboards currently are
- ./etc/grafana/ldap.toml:/etc/grafana/ldap.toml
env_file: “.env”
For now, the default home dashboard is set to point to the static file that is on my VM.
With git sync, i’ll not need dashboards to be cloned in my VM. Meaning there is no static file to set on the default_home_dashboard_path.
Can you please explain what is exactly " StaticRootPath " in the sentence “If this value is empty, then Grafana uses StaticRootPath”
Is there any way to set the default_home_dashboard_path with the dash UID instead of path and name ?
Thanks
