grafana-json-datasource
grafana-json-datasource copied to clipboard
Data source provisioning as code is broken
The data source provisioning is broken:
- If you define user authentication it is ignored by Grafana, you need to make the data source editable and then once is loaded in the UI you can provision it
- You cannot link a dashboard with the provisioned data source, even after providing a 'uid'. Instead Grafana ignores it and creates a new uid, which breaks the provisioning.
For example, the following breaks:
# User Authentication is broken for the provisioning!
# Workaround: Make the datasource editable and fix it after deployment
# https://github.com/grafana/grafana-json-datasource/issues/298
---
apiversion: 1
deleteDatasources:
- name: "test"
datasources:
- name: "test"
type: marcusolsson-json-datasource
url: https://machine.example.com/rest/api
basicAuth: true
basicAuthUser: "user"
isDefault: false
editable: true
version: 11
uid: "RD-rXQV4A"
secureJsonData:
basicAuthPassword: "ZZZ"
Grafana version: 9.2.4 OS: Linux Fedora 29 ** Browser**: Chrome ** Plugin version**: 1.3.1
same problem
hi @jnunezgts , sorry, i was not able to reproduce this. i tried it with a provisioning file like this:
apiVersion: 1
datasources:
- name: jauth
uid: jauth
type: marcusolsson-json-datasource
url: http://localhost:5555/test.json
basicAuth: true
basicAuthUser: user1
secureJsonData:
basicAuthPassword: pass1
and it created the datasource that had correct uid
and sent the correct http-basic-auth info to the server.
could you try with the newest grafana version and with the newest json plugin version?
as we got no new information, we're closing the issue. we can reopen it if we get new info.
still not working
@furkancetn i'm sorry to hear it's not working for you. unfortunately we were not able to reproduce it, so if still does not work for you please do the following:
- test with the current grafana-version and plugin-version
- if it does not work, please create a new github issue, and describe the version numbers from [1], and also the error in detail.
thanks!