grafana / influxdb-flux-datasource

Grafana datasource plugin for Flux (InfluxDB)
Apache License 2.0
51 stars 21 forks source link

[Question] how to code datasource.yml to autodeploy a flux datasource ? #87

Closed toni-moreno closed 4 years ago

toni-moreno commented 4 years ago

Hello guys.

I've been looking for documentation but nothing about autodeploy flux datasources.

Here official documentation.

https://grafana.com/docs/grafana/latest/administration/provisioning/

Here a lot of examples for other datasource types

https://raw.githubusercontent.com/grafana/grafana/master/devenv/datasources.yaml

nothing about flux.

Any idea on how to provision flux datasource though the grafana provisioning api?

Thank you very much!

toni-moreno commented 4 years ago

Finally I reviewed the browser API queries and these parameters work to me.

  - name: flux-datasource-example
    type: grafana-influxdb-flux-datasource
    access: proxy
    basicAuth: true
    basicAuthUser: myuser
    url: http://myinfluxdb:8086
    jsonData:
      timeInterval: "15s"
      bucket: mydb_or_bucket
      url: http://myinfluxdb:8086
    secureJsonData:
      password: sondas
      basicAuthPassword: "mypass"
    secureJsonFields:
      basicAuthPassword: true
    editable: true
caleb15 commented 3 years ago

For people who come across this issue in a search for how to provision a flux datasource, please be aware that influxdb-flux-datasource is deprecated. Flux is now built into the influx datasource. See https://github.com/grafana/grafana/issues/27389 for how to provision it with the new way.