I’m working on migrating our production Grafana v5.2.4 to kubernetes and have build a Helm chart to deploy the container is it is working. The issue is with taking the dashboards from the production system and using them in the container.
I have a the Grafana container running with a side car container I call nsr to dynamically create dashboards based on an Excel spreadsheet. The Grafana and nsr container mount the /var/lib/grafana/dashboards directory. Based on the documentation I have read (Provisioning | Grafana Labs), I should be able to put the dashboards into the directory and then at the updateIntervalSeconds of 10 seconds Grafana should read the directory and import any new dashboards.
The issue is when I put a new dashboard into the /var/lib/grafana/dashboards directory, I get an error
t=2021-03-31T14:56:11+0000 lvl=eror msg="failed to load dashboard from " logger=provisioning.dashboard type=file name=default file=/var/lib/grafana/dashboards/u100es01800.json error=“Dashboard title cannot be empty”
I have my dasboardProviders.yaml file in the correct location:
grafana@grafana-v1-0:/etc/grafana/provisioning/dashboards$ ls
dashboardProviders.yaml
And it points to the correct location:
grafana@grafana-v1-0:/etc/grafana/provisioning/dashboards$ cat dashboardProviders.yaml
apiVersion: 1
providers:
- allowUiUpdates: false
disableDeletion: false
folder: “”
name: default
options:
foldersFromFilesStructure: true
path: /var/lib/grafana/dashboards
orgId: 1
type: file
updateIntervalSeconds: 10
The u100es01800.json file looks like, which it does have a title:
grafana@grafana-v1-0:/var/lib/grafana/dashboards$ cat u100es01800.json
{
“dashboard”: {
“title”: “u100es01800”,
“originalTitle”: “u100es01800”,
“tags”: [
“COMPUTE”,
“hypervisor”
],
…
“annotations”: {
“list”: []
},
“refresh”: “30s”,
“schemaVersion”: 12,
“version”: 30,
“links”: []
}
}
Not sure what I’m missing.