Grafana v5.2.4 Dashboard title cannot be empty error when using mounted volumes

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.

Hey there,

Have you tried un-nesting title and the other values from the dashboard array? Browsing popular dashboard JSONs just now, it looked like title was top-level and not inside a nested array.

Also, I understand that this instance is in production, but has your organization tried/considered upgrading Grafana? Could you troubleshoot this in dev to see if the issue is version-specific? I think support will be better with Grafana 7+.

Lastly, here’s a doc on JSON fields for dashboards that you can use as a template.

Hi, I am experiencing the same error on a Grafana (v7.5.1) deployed in Kubernetes. I exported a dashboard from another Grafana instance, but provisioning into a Kubernetes Grafana as a file failed.

2021-04-03T22:40:14+0000 lvl=eror msg="failed to load dashboard from " logger=provisioning.dashboard type=file name= Prometheus file=/etc/grafana/provisioning/dashboards/grafana_telegraf.json error=“Dashboard title cannot be empty”

I tried external and ‘regular’ export options to generate json. I imported the same json file via UI into the Kubernetes Grafana without any issues.

I solved this issue by removing the following from the beginning and end of the dashboard json file:

{
“dashboard”:

} ← last brace in the file

1 Like

This topic was automatically closed after 365 days. New replies are no longer allowed.