Hi,
I was using stable/prometheus-operator helm chart to deploy Prometheus components along with Grafana. The issue I ran into was that everytime the Grafana pod gets restarted, all custom configuration and dashboards which I imported from Grafana dashboard hub were removed. I tried to add this config below for importing dashboards from Grafana in the values.yaml file, however it didn't work as expected, the pod failed to start because it says not able to parse the dashboardproviders.yaml file.. Any advice where was wrong? Thanks.
grafana:
enabled: true
replicas: 1
image:
repository: grafana/grafana
tag: 7.1.0
dashboardProviders:
dashboardproviders.yaml:
apiVersion: v1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default
dashboard:
default:
prometheus-status:
gnetId: 2
revision: 2
datasource: Prometheus
t=2020-07-22T20:12:37+0000 lvl=eror msg="Failed to provision dashboard" logger=provisioning error="Failed to create provisioner: Failed to read dashboards config: could not parse provisioning config file: dashboardproviders.yaml error: yaml: unmarshal errors:\n line 1: cannot unmarshal !!map into []*dashboards.configV0"
t=2020-07-22T20:12:37+0000 lvl=eror msg="Stopped ProvisioningService" logger=server reason="Failed to create provisioner: Failed to read dashboards config: could not parse provisioning config file: dashboardproviders.yaml error: yaml: unmarshal errors:\n line 1: cannot unmarshal !!map into []*dashboards.configV0"
t=2020-07-22T20:12:37+0000 lvl=info msg="Stopped Stream Manager"
Zhang