Importing dashboard to Grafana using Kube-prometheus stack with Helm

Hi,

I am using kube-prometheus-stack with Helm for setting up Promtheus and Grafana . Deployment looks good but
I couldn’t get my dashboard deployed to Grafana…I have used following configuration
grafana:
dashboards:
custom-dashboard:
file: dashboards/custom-dashboard.json
This is not deploying my json file to Grafana. …. How can I get it deployed ?

  1. I am also looking to enable default dashboards but selectively …. I see lots of dashboards deploys when I enable forceDeployDashboards …

Thank you.

I got it by creating a configmap with json content . Important thing is to add label ‘grafana-dashboard’:‘1’ to configmap and add side-car config in values.yaml.

That did the job.

Thanks

Hello,
can you, please, share your code ?
Thanks

Hi,
This configuration worked for me (using sidecar for dashboards & alerts)

 grafana:
      sidecar:
        dashboards:
          enabled: true
          label: grafana_dashboard
          folder: /var/lib/grafana/dashboards
          updateIntervalSeconds: 10
          folderAnnotation: grafana_folder
          provider:
            allowUiUpdates: true
            foldersFromFilesStructure: true
        alerts:
          enabled: true
          label: grafana_alert
  • can’t be used together with parameters dashboardProviders, datasources and dashboards