Home dashboard displaying wrong (General) folder

  • What Grafana version and what operating system are you using?
    Using Grafana v9.4.7, configured via kube-prometheus-stack helm charts

  • What are you trying to achieve?
    I am trying to set the default home dashboard to display a custom dashboard from a custom folder.

  • How are you trying to achieve it?
    I have successfully provisioned custom dashboards in a custom folder, and have verified the path to the desired existing dashboard. I have set the default_home_dashboard_path under the dashboards section of grafana.ini to that path.

  • What happened?
    The specified dashboard does show up upon login, but it shows up as part of the General folder (where the dashboards provisioned by kube-prometheus-stack go), even though its actual location is in a different folder (ODI). Checking in both the UI and on the filesystem shows that it does live where the rest of the custom ODI dashboards live.

  • What did you expect to happen?
    For the UI to show the folder under ODI, as it does if you view it by browsing within that folder.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No errors or anything standing out in the logs.

  • Did you follow any online instructions? If so, what is the URL?
    I followed the instructions in the official docs, which did work for making the correct dashboard show up.

Hi @kdmcclin,

Can you please tell us what you had defined in the dashboard provider config file under the field folder i.e.:

# <string> name of the dashboard folder.
    folder:

I wrote a post which is about Dashboard providing (the only difference is that env. is Docker instead of Kubernetes) and it worked correctly. Might give you some more pointers in case missed something.

If all is fine and still having issues. Then please provide the steps of reproduction (step-by-step) so that the community can also try to reproduce it on a test machine.

Thanks.

Thanks for the response. The folder field looks like below, and it does provision into the correct folder as seen in the second screenshot in the initial post.

folder: 'ODI'

What additional reproduction steps from my initial post would be helpful? I didn’t get into how I provisioned the custom dashboards (dashboardProviders and configmaps) because they do provision correctly, it’s just the setting of the default_home_dashboard_path that results in the odd UI.

I am not yet an expert with Kubernetes and Helm but I am willing to give it a try. Also, other community members might also help too.

Yes, please share the steps of reproduction so that I can try it out on my local machine and see if this is simply a configuration issue or something else.

Please provide all the files (remove any sensitive data) which you used during the provisioning.

Thanks

The reason I asked about additional steps is because I’m not sure how much is relevant, but happy to provide more details if needed. Here are the reproduction steps as provided in my initial post, with the added file details for the home dashboard. I have several other dashboards successfully provisioned the same way in the same folder, but I’m going to assume those aren’t relevant since the issue here is with the UI of the home page.

STEP 1: successfully provision custom dashboards in a custom folder
prometheus-stack.yaml

dashboardProviders:
        dashboardproviders.yaml:
          apiVersion: 1
          providers:
          - name: 'home'
            orgId: 1
            folder: 'ODI'
            type: file
            disableDeletion: false
            editable: true
            allowUiUpdates: true
            options:
              path: /var/lib/grafana/dashboards/home
dashboardsConfigMaps:
       home: "home-dashboard"

home-dashboard.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: home-dashboard
  namespace: monitoring
data:
  odi-dashboards-home-dashboard.json: |-
    {
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": {
              "type": "grafana",
              "uid": "-- Grafana --"
            },
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "target": {
              "limit": 100,
              "matchAny": false,
              "tags": [],
              "type": "dashboard"
            },
            "type": "dashboard"
          }
        ]
      },
      "editable": true,
      "fiscalYearStartMonth": 0,
      "graphTooltip": 0,
      "id": 14,
      "links": [],
      "liveNow": false,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "editable": true,
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 1,
          "options": {
            "code": {
              "language": "plaintext",
              "showLineNumbers": false,
              "showMiniMap": false
            },
            "content": "If you're new to Grafana, you can find a list of the most commonly viewed dashboards below. You can also view all ODI dashboards by clicking \"Browse\" in the Dashboards section (icon of four squares) of the left hand menu, or following the link in the documentation links list below.",
            "mode": "markdown"
          },
          "pluginVersion": "9.4.7",
          "style": {},
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "refId": "A"
            }
          ],
          "title": "Welcome to Grafana",
          "type": "text"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "description": "Displays the five most commonly viewed ODI dashboards",
          "gridPos": {
            "h": 11,
            "w": 24,
            "x": 0,
            "y": 3
          },
          "id": 5,
          "options": {
            "folderId": 1,
            "maxItems": 5,
            "query": "",
            "showHeadings": false,
            "showRecentlyViewed": false,
            "showSearch": true,
            "showStarred": false,
            "tags": [
              "popular"
            ]
          },
          "pluginVersion": "9.4.7",
          "title": "Popular ODI Dashboards",
          "type": "dashlist"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 14
          },
          "id": 2,
          "options": {
            "code": {
              "language": "plaintext",
              "showLineNumbers": false,
              "showMiniMap": false
            },
            "content": "**REDACTED**",
            "mode": "html"
          },
          "pluginVersion": "9.4.7",
          "style": {},
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "refId": "A"
            }
          ],
          "title": "Documentation Links",
          "type": "text"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 14
          },
          "id": 3,
          "options": {
            "code": {
              "language": "plaintext",
              "showLineNumbers": false,
              "showMiniMap": false
            },
            "content": "**REDACTED**",
            "mode": "html"
          },
          "pluginVersion": "9.4.7",
          "style": {},
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "refId": "A"
            }
          ],
          "title": "Tips & Shortcuts",
          "type": "text"
        }
      ],
      "refresh": "",
      "revision": 1,
      "schemaVersion": 38,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "collapse": false,
        "enable": true,
        "now": true,
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "status": "Stable",
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ],
        "type": "timepicker"
      },
      "timezone": "browser",
      "title": "Grafana Home",
      "uid": "home",
      "version": 2,
      "weekStart": ""
    }

STEP 2: check the UI and verify the path to the desired existing dashboard

Open a shell on the host and navigate to dashboard location

/var/lib/grafana/dashboards/home $ ls
odi-dashboards-home-dashboard.json

STEP 3: set the default_home_dashboard_path under the dashboards section of grafana.ini to that path
prometheus-stack.yaml

grafana.ini:
        auth.ldap:
          enabled: true
          allow_sign_up: true
          config_file: /etc/grafana/ldap.toml
        users:
          default_theme: light
        dashboards:
          default_home_dashboard_path: /var/lib/grafana/dashboards/home/odi-dashboards-home-dashboard.json

STEP 4: deploy as usual and log in to see this view

STEP 5: navigate via the UI to the ODI folder and see that the home dashboard is still in the proper location despite the home page UI in the previous step

Please let me know if any other information will be useful.

Thanks

The 9.5.1 update resolved this issue, so if anyone else who’s struggling with this sees this, try updating to (at least) 9.5.1.

2 Likes