Hello,
I am using the Grafana Docker container 5.3.0-beta3 and want to use the new Stackdriver datasource. When I upload the config file manually it works nicely. But now I want to provision it automatically.
My datasources yaml looks like this:
apiVersion: 1
datasources:
- editable: true
jsonData:
clientEmail: grafana-monitoring@mygcpproject.iam.gserviceaccount.com
defaultProject: mygcpproject
tokenUri: https://oauth2.googleapis.com/token
name: stackdriver
orgId: 1
readOnly: false
secureJsonData:
privateKey: '-----BEGIN PRIVATE KEY-----asjkdasdk679123bla-----END
PRIVATE KEY-----'
type: stackdriver
version: 1
Now i can see that the datasource is created but when I use it, it fails with these logs:
t=2018-10-09T05:38:50+0000 lvl=eror msg="Failed to get access token" logger=data-proxy-log error="private key should be a PEM or plain PKSC1 or PKCS8; parse error: asn1: structure error: tags don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2"
I also tried adding the whole gcp generated json but that didn’t work either. How is the config supposed to look like? The docu just says
privateKey: “”
Thanks for your help