Hi. I have setup prometheus as a provisioned datasource, but I cannot seem to set it as the default datasource. My config is as follows:
#prometheus.yaml
apiVersion: 1
datasources:
- name: Prometheus
- type: prometheus
- access: proxy
- url: http://localhost:9090
- isDefault: true
- version: 1
- editable: false
It works great, except that it isn’t marked as the default data source so it isn’t used as the default. Here is what the config looks like in Grafana:
any ideas or information would be appreciated.
I’m currently working on how to set default with two provisioned datasources and two orgs. Did you ever figure this out?
I figured my problem out, it wasn’t the correct yaml format (it was a stupid mistake, as its correct in the very similar example in the docs.) The correct version was:
#prometheus.yaml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://localhost:9090
isDefault: true
version: 1
editable: false
I was putting each line in its own dictionary within the list (as in every key:value was its own dictionary), instead of making a list with one dictionary, containing all the key values.
I am only using one org, so I don’t know about your issue. Possibly a yaml issue as well?