I am using grafana and its sidecar component in a kubernetes cluster.
I have two different dashboard providers as follows:
dashboardProviders: dashboardproviders.yaml: apiVersion: 1 providers: - name: 'dpa' orgId: 1 folder: 'Dashboards A' type: file disableDeletion: false updateIntervalSeconds: 10 editable: true options: path: /var/lib/grafana/dashboards/dpa - name: 'dpb' orgId: 1 folder: 'Dashboards B' type: file disableDeletion: false updateIntervalSeconds: 10 editable: true options: path: /var/lib/grafana/dashboards/dpb
and here is the relevant part of my sidecar configuration:
sidecar: dashboards: enabled: true folder: /var/lib/grafana/dashboards/ defaultFolderName: dpa ...
With this configuration in mind, when I provide a configmap (containing the dashboard) with the annotation below, it is working fine:
I assumed if I am not providing any target directory, the dashboard json file should go to the defaultFolderName directory (in my case “dpa”) that I have defined. However, the json files are saved in the root directory (/var/lib/grafana/dashboards/).
I have two questions:
1- is my assumption wrong about the defaultFolderName usage?
2- if it is wrong, is there any other way to provide such functionality the dashboards can be configured to be set in different directory while there is also a default directory for the dashboards that are not configured?