Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't import grafana dashboards using helm values #4437

Open
yalattas opened this issue Apr 10, 2024 · 1 comment
Open

can't import grafana dashboards using helm values #4437

yalattas opened this issue Apr 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@yalattas
Copy link

Describe the bug a clear and concise description of what the bug is.

I have trying to import Grafana dashboard from official published Grafana dashboards,

reference: https://grafana.com/grafana/dashboards/4698-ambassador-edge-stack/

I have the following

$ helm upgrade --install test -n monitoring prometheus-community/kube-prometheus-stack --values prometheus_values.yaml --values grafana_dashboards.yaml

Error

Error: UPGRADE FAILED: template: kube-prometheus-stack/charts/grafana/templates/deployment.yaml:36:28: executing "kube-prometheus-stack/charts/grafana/templates/deployment.yaml" at <include "grafana.configData" .>: error calling include: template: kube-prometheus-stack/charts/grafana/templates/_config.tpl:83:23: executing "grafana.configData" at <$value>: wrong type for value; expected map[string]interface {}; got string

the problem occurred due to grafana.dashboards object.

grafana_dashboards.yaml

# ref: https://grafana.com/dashboards
grafana:
  dashboardProviders:
    dashboardproviders.yaml:
      apiVersion: 1
      providers:
      - name: 'ambassador'
        orgId: 1
        folder: 'managed'
        type: file
        disableDeletion: true
        editable: false
        options:
          path: /var/lib/grafana/dashboards/ambassador
  dashboards:
    ambassador: # must be same as provider
      gnetId: 4698
      revision: 6
      datasource: Prometheus

extra log from Grafana container

grafana logger=provisioning.dashboard type=file name=ambassador t=2024-04-10T01:50:43.117395995Z level=error msg="failed to search for dashboards" error="stat /var/lib/grafana/dashboards/ambassador: no such file or directory"
grafana logger=provisioning.dashboard type=file name=ambassador t=2024-04-10T01:50:53.117729397Z level=error msg="Cannot read directory" error="stat /var/lib/grafana/dashboards/ambassador: no such file or directory"
grafana logger=provisioning.dashboard type=file name=ambassador t=2024-04-10T01:50:53.117823608Z level=error msg="Failed to read content of symlinked path" path=/var/lib/grafana/dashboards/ambassador error="lstat /var/lib/grafana/dashboards: no such file or directory"
grafana logger=provisioning.dashboard type=file name=ambassador t=2024-04-10T01:50:53.117958853Z level=info msg="falling back to original path due to EvalSymlink/Abs failure"
grafana logger=provisioning.dashboard type=file name=ambassador t=2024-04-10T01:50:53.117982318Z level=error msg="failed to search for dashboards" error="stat /var/lib/grafana/dashboards/ambassador: no such file or directory"
grafana logger=provisioning.dashboard type=file name=ambassador t=2024-04-10T01:51:03.1176993Z level=error 

What's your helm version?

v3.14.0

What's your kubectl version?

v1.29.0

Which chart?

prometheus-community/kube-prometheus-stack

What's the chart version?

58.0.0

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?

No response

Enter the command that you execute and failing/misfunctioning.

helm upgrade --install test -n monitoring prometheus-community/kube-prometheus-stack --values prometheus_values.yaml --values grafana_dashboards.yaml

Anything else we need to know?

No response

@yalattas yalattas added the bug Something isn't working label Apr 10, 2024
@yalattas
Copy link
Author

yalattas commented Apr 10, 2024

@yalattas yalattas changed the title [name of the chart e.g. prometheus-kube-stack] Issue Title can't import grafana dashboards using helm values Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant