charts icon indicating copy to clipboard operation
charts copied to clipboard

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

Open leandroandrade87 opened this issue 6 years ago • 8 comments

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.

leandroandrade87 avatar May 20 '20 17:05 leandroandrade87

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.

cabrinha avatar Jun 05 '20 06:06 cabrinha

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

dbrennand avatar Jul 02 '20 15:07 dbrennand

Same issue for me. Is someone finaly solved this ?

token97 avatar Jul 09 '20 09:07 token97

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.

stale[bot] avatar Aug 08 '20 11:08 stale[bot]

This issue is being automatically closed due to inactivity.

stale[bot] avatar Aug 22 '20 18:08 stale[bot]

Not stale, still broken!

austince avatar Aug 28 '20 22:08 austince

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

alexon1234 avatar Sep 08 '20 15:09 alexon1234

Hey, did someone solve this?

mayaaravotwm avatar Feb 11 '21 12:02 mayaaravotwm