# Dashboard provisioning

**URL:** <https://community.grafana.com/t/dashboard-provisioning/5667>\
**Category:** Configuration\
**Tags:** provisioning\
**Created:** [February 22, 2018, 1:49pm UTC](https://community.grafana.com/t/dashboard-provisioning/5667 "2018-02-22T13:49:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vervas](https://avatars.discourse-cdn.com/v4/letter/v/b2d939/32.png) [@vervas](https://community.grafana.com/u/vervas)\
**Post date:** [February 22, 2018, 1:49pm UTC](https://community.grafana.com/t/dashboard-provisioning/5667/1 "2018-02-22T13:49:01Z")

</div>

Hi there,

I am trying to use the new provisioning features of Grafana 5.0 for dashboard creation. Reading [http://docs.grafana.org/v5.0/administration/provisioning/#dashboards](http://docs.grafana.org/v5.0/administration/provisioning/#dashboards) it is not clear where the dashboards json files should be saved and with which filename. At the moment I have the files placed under `/var/lib/grafana/dashboards` as suggested in the documentation and set in the `provisioning/dashboards/dashboards.yaml` file, however no dashboard appears to be loaded.

What is the correct structure over there?

Thanks in advance,  
Dimitris

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [February 22, 2018, 10:13pm UTC](https://community.grafana.com/t/dashboard-provisioning/5667/2 "2018-02-22T22:13:07Z")

</div>

Hi,

Which 5.0 pre version are you using?

There are a [config variable for provisioning](http://docs.grafana.org/v5.0/installation/configuration/#provisioning) that specifies where to look for provisioning .yaml files. Per default this are configured to `conf/provisioning` directory. You’ll then put your dashboards.yaml in `conf/provisioning/dashboards directory. You can see that there are a [few example files in Grafana code base](https://github.com/grafana/grafana/tree/master/conf/provisioning).

Please make sure to restart Grafana after you added your yaml files. Also, check the [Grafana server log](http://docs.grafana.org/installation/troubleshooting/#logging).

Marcus

---

<div class="post-metadata">

**Author:** ![vervas](https://avatars.discourse-cdn.com/v4/letter/v/b2d939/32.png) [@vervas](https://community.grafana.com/u/vervas)\
**Post date:** [February 23, 2018, 10:38am UTC](https://community.grafana.com/t/dashboard-provisioning/5667/3 "2018-02-23T10:38:13Z")

</div>

Hey Marcus

Thanks for the clarification.

I am running Grafana v5.0.0-beta4 (commit: 1de8891). It looks like my issue was an invalid `dashboards.yaml` at `conf/provisioning/dashboards`. It would be nice to add some relevant warnings in the logs in similar cases, since for me it was failing silently. An info message in case of successful loading could also be very useful.

Cheers,  
Dimitris

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [February 23, 2018, 11:09am UTC](https://community.grafana.com/t/dashboard-provisioning/5667/4 "2018-02-23T11:09:08Z")

</div>

Hi,

Great to hear that you sorted it out 👍

Just looked in the source code and it seems like we don’t log anything if failing to parse yaml files. Gonna forward the feedback regarding this so that we can fix it. Thanks for the feedback!

Marcus

---

<div class="post-metadata">

**Author:** ![dnarahari](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@dnarahari](https://community.grafana.com/u/dnarahari)\
**Post date:** [April 27, 2018, 8:25am UTC](https://community.grafana.com/t/dashboard-provisioning/5667/5 "2018-04-27T08:25:04Z")

</div>

I am using the same grafana version as above stated.  
I have my all.yml -\> /etc/grafana/provisioning/all.yml

```auto
apiVersion: 1

providers:
- name: 'dev'
  orgId: 1
  folder: ''
  type: file
  disableDeletion: false
  editable: false
  options:
    path: /var/lib/grafana/dashboards

```

All the json file of the dashboard templates are in /var/lib/grafana/dashboards. But i do not see the dashboards loaded. Please help.

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [April 27, 2018, 9:11am UTC](https://community.grafana.com/t/dashboard-provisioning/5667/6 "2018-04-27T09:11:37Z")

</div>

Then you need to change the [_provisioning configuration parameter_](http://docs.grafana.org/installation/configuration/#provisioning) to point to `/etc/grafana/provisioning`. Then you need to have the all.yml in a subfolder named dashboards /etc/grafana/provisioning/dashboards/all.yml.

Marcus

---

<div class="post-metadata">

**Author:** ![dnarahari](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@dnarahari](https://community.grafana.com/u/dnarahari)\
**Post date:** [April 27, 2018, 9:51am UTC](https://community.grafana.com/t/dashboard-provisioning/5667/7 "2018-04-27T09:51:34Z")

</div>

Hi,  
I am getting the below error in logs after your suggested changes:  
t=2018-04-27T04:50:46-0500 lvl=eror msg="failed to load dashboard from " logger=provisioning.dashboard type=file name=local-dev file=/var/lib/grafana/dashboards/CS-Collectd.json error=“Dashboard title cannot be empty”

CS-Collectd.json looks like this and it has title field

```json
{
  "dashboard": {
    "annotations": {
      "list": []
    },
    "editable": true,
    "gnetId": null,
    "graphTooltip": 0,
    "hideControls": false,
    "id": null,
    "links": [],
    "refresh": false,
    "rows": [
      {
        "collapse": false,
        "height": 250,
        "panels": [
          {
            "aliasColors": {},
            "bars": false,
            "datasource": "{{ item.datasource }}",
            "fill": 1,
            "id": 12,
            "legend": {
              "alignAsTable": true,
              "avg": true,
              "current": true,
              "max": true,
              "min": true,
              "show": true,
              "total": false,
              "values": true
            },
            "lines": true,
            "linewidth": 1,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "span": 12,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "refId": "A",
                "target": "aliasByNode($Stack.$ServiceType.{{ country_code }}.$DCType.$DC.servers.$Servers.collectd-cache.*, 6, 8)",
                "textEditor": false
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeShift": null,
            "title": "Collectd Cache Size",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              }
            ]
          }
        ],
        "repeat": null,
        "repeatIteration": null,
        "repeatRowId": null,
        "showTitle": false,
        "title": "Dashboard Row",
        "titleSize": "h6"
      },
      {
        "collapse": false,
        "height": 250,
        "panels": [
          {
            "aliasColors": {},
            "bars": false,
            "datasource": "{{ item.datasource }}",
            "fill": 1,
            "id": 13,
            "legend": {
              "alignAsTable": true,
              "avg": true,
              "current": true,
              "max": true,
              "min": true,
              "show": true,
              "total": false,
              "values": true
            },
            "lines": true,
            "linewidth": 1,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "span": 12,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "refId": "A",
                "target": "aliasByNode($Stack.$ServiceType.{{ country_code }}.$DCType.$DC.servers.$Servers.collectd-write_queue.*, 6, 8)",
                "textEditor": false
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeShift": null,
            "title": "Collectd Write Queue Size",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              }
            ]
          }
        ],
        "repeat": null,
        "repeatIteration": null,
        "repeatRowId": null,
        "showTitle": false,
        "title": "Dashboard Row",
        "titleSize": "h6"
      }
    ],
    "schemaVersion": 14,
    "style": "dark",
    "tags": [],
    "templating": {
      "list": [
        {
          "allValue": null,
          "current": {"value":"first-item"},
          "datasource": "{{ item.datasource }}",
          "hide": 0,
          "includeAll": false,
          "label": null,
          "multi": true,
          "name": "Stack",
          "options": [],
          "query": "*",
          "refresh": 1,
          "regex": "/^(?!icinga.*|carbon.*|CS.*|rg.*)/",
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false
        },
        {
          "allValue": null,
          "current": {"value":"first-item"},
          "datasource": "{{ item.datasource }}",
          "hide": 0,
          "includeAll": false,
          "label": null,
          "multi": true,
          "name": "ServiceType",
          "options": [],
          "query": "$Stack.*",
          "refresh": 1,
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false
        },
        {
          "allValue": null,
          "current": {"value":"first-item"},
          "datasource": "{{ item.datasource }}",
          "hide": 0,
          "includeAll": false,
          "label": null,
          "multi": true,
          "name": "DCType",
          "options": [],
          "query": "$Stack.$ServiceType.{{ country_code }}.*",
          "refresh": 1,
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false
        },
        {
          "allValue": null,
          "current": {"value":"first-item"},
          "datasource": "{{ item.datasource }}",
          "hide": 0,
          "includeAll": false,
          "label": null,
          "multi": true,
          "name": "DC",
          "options": [],
          "query": "$Stack.$ServiceType.{{ country_code }}.$DCType.*",
          "refresh": 1,
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false
        },
        {
          "allValue": null,
          "current": {"value":"first-item"},
          "datasource": "{{ item.datasource }}",
          "hide": 0,
          "includeAll": false,
          "label": null,
          "multi": true,
          "name": "Servers",
          "options": [],
          "query": "$Stack.$ServiceType.{{ country_code }}.$DCType.$DC.servers.*",
          "refresh": 1,
          "regex": "",
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false
        }
      ]
    },
    "time": {
      "from": "now-24h",
      "to": "now"
    },
    "timepicker": {
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ]
    },
    "timezone": "browser",
    "title": "COS-Collectd",
    "version": 2
  },
  "overwrite": true
}

```

---

<div class="post-metadata">

**Author:** ![vervas](https://avatars.discourse-cdn.com/v4/letter/v/b2d939/32.png) [@vervas](https://community.grafana.com/u/vervas)\
**Post date:** [April 27, 2018, 11:35am UTC](https://community.grafana.com/t/dashboard-provisioning/5667/8 "2018-04-27T11:35:04Z")

</div>

Try stripping the top level `dashboard` and `overwrite` keys and include only the content of the `dashboard` value. You might also have to remove the key `id` from it.

---

<div class="post-metadata">

**Author:** ![dnarahari](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@dnarahari](https://community.grafana.com/u/dnarahari)\
**Post date:** [April 27, 2018, 6:21pm UTC](https://community.grafana.com/t/dashboard-provisioning/5667/9 "2018-04-27T18:21:34Z")

</div>

Thank you. This worked. But the dashboard loads with a delay is this expected or do I need to install any additional plugins?

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [April 30, 2018, 8:37am UTC](https://community.grafana.com/t/dashboard-provisioning/5667/10 "2018-04-30T08:37:31Z")

</div>

What do you mean by delay - everytime you load it in UI?

Marcus
