Charts: [stable/grafana] Dashboad file is empty when use file option

Created on 20 May 2020  路  7Comments  路  Source: helm/charts

Describe the bug
When use the file option in dashboard, the json file in Grafana is empty, the only option than i could use was the RAW_JSON.

Worktree:

helm/helmfile-grafana.yaml

- name: grafana
  namespace: grafana
  chart: stable/grafana
  version: 5.0.25
  labels:
    app: xxx
  values:
  - "helmfiles/grafana/{{ requiredEnv "EKS_ENV" }}/values.yaml"

values.yaml

dashboardProviders:
  dashboardproviders.yaml:
    apiVersion: 1
    providers:
    - name: 'default'
      orgId: 1
      folder: ''
      type: file
      disableDeletion: false
      editable: true
      options:
        path: /var/lib/grafana/dashboards/default


dashboards:
  default:
    spring-batch:
      file: helm/dashboard-grafana/spring-batch.json

helm/helmfiles/grafana/production/dashboards/spring-batch.json

Version of Helm and Kubernetes:

sh-4.2$ helm version
Client: &version.Version{SemVer:"v2.15.2", GitCommit:"8dce272473e5f2a7bf58ce79bb5c3691db54c96b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.15.1", GitCommit:"cf1de4f8ba70eded310918a8af3a96bfe8e7683b", GitTreeState:"clean"}
sh-4.2$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.7-eks-1861c5", GitCommit:"1861c597586f84f1498a9f2151c78d8a6bf47814", GitTreeState:"clean", BuildDate:"2019-09-24T22:12:08Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.11-eks-af3caf", GitCommit:"af3caf6136cd355f467083651cc1010a499f59b1", GitTreeState:"clean", BuildDate:"2020-03-27T21:51:36Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}

Which chart:

- name: grafana
  namespace: grafana
  chart: stable/grafana
  version: 5.0.25

What happened:
This error:
grafana t=2020-05-20T17:12:15+0000 lvl=eror msg="failed to load dashboard from " logger=provisioning.dashboard type=file name=default file=/var/lib/grafana/dashboards/default/spring-batch.json error=EOF

What you expected to happen:
The dashboard works.

lifecyclstale

Most helpful comment

Not stale, still broken!

All 7 comments

I'm experiencing the same issue when calling this chart as a subchart. I've got a dashboard JSON in my parent chart, under files/dashboards/nginx-ingress/nginx-metrics.json, but it doesn't seem to render when using a similar config as the one posted above.

grafana:
  dashboards:
    nginx-ingress:
      nginx-metrics:
        file: files/dashboards/nginx-ingress/nginx-metrics.json
  dashboardProviders:
    dashboardproviders.yaml:
      apiVersion: 1
      providers:
      - name: nginx-ingress
        orgId: 1
        folder: 'nginx-ingress'
        type: file
        disableDeletion: false
        updateIntervalSeconds: 3
        options:
          path: /var/lib/grafana/dashboards/nginx-ingress

It'd be really helpful if someone could provide a full working example for supplying dashboard JSONs to this chart using local files.

I also ran into the same issue and resulted in using the sidecar/configmap dashboard option instead.

EDIT: This issue could also be related to https://github.com/helm/charts/issues/21638

Same issue for me. Is someone finaly solved this ?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

This issue is being automatically closed due to inactivity.

Not stale, still broken!

Same issue

    dashboardProviders:
      dashboardproviders.yaml:
        apiVersion: 1
        providers:
        - name: 'default'
          orgId: 1
          folder: ''
          type: file
          disableDeletion: true
          editable: false
          options:
            path: /var/lib/grafana/dashboards/default

    dashboards:
      default:
        elasticsearch:
          file: dashboards/elasticsearch.json

When I do cat /var/lib/grafana/dashboards/default/elasticsearch.json and is empty

Was this page helpful?
0 / 5 - 0 ratings