grafana-json-datasource
grafana-json-datasource copied to clipboard
Unable to setup datasource with basic auth
I have a grafana instance in docker, i will for datasources to be added from a yml file. All my other datasources work but i am unable to provide credentials
My datasource
- access: "proxy"
name: "rabbitmq"
org_id: 1
type: "marcusolsson-json-datasource"
url: "rabbitmq:15672"
version: 1
basicAuth: true
withCredentials: true #Tried without and still have an issue
basicAuthUser: myuser
basicAuthPassword: andpassword.$STAGE
editable: true
also attempted
secureJsonData:
basicAuthPassword: andpassword.$STAGE
But after creation auth is still disabled

Hello,
The bug is still around, I have the following YAML file and it doesn't work either after following the general provision guidelines:
---
apiversion: 2
datasources:
- name: "My JSON datasource"
type: marcusolsson-json-datasource
url: https://example.com:443/api/endpoint
basicAuth: true
basicAuthUser: "user"
isDefault: false
editable: true
version: 9
secureJsonData:
basicAuthPassword: "password"
So the datasource gets provisioned and the only way to fix it is to make it editable so you can change the credentials after it gets created.
I was looking at the code but could not find anything that hints how to hint the provisioning about the right credentials.