Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provisioning of an InfluxDB datasource using Flux query language fails #27389

Closed
cykl opened this issue Sep 4, 2020 · 6 comments
Closed

Provisioning of an InfluxDB datasource using Flux query language fails #27389

cykl opened this issue Sep 4, 2020 · 6 comments

Comments

@cykl
Copy link
Contributor

cykl commented Sep 4, 2020

What happened:

When an InfluxDB data source configured to use the Flux query language is provisioned, it exist but supplied configuration wasn't applied.

What you expected to happen:

Data source must exist, use Flux query language and token, bucket etc. be set.

How to reproduce it (as minimally and precisely as possible):

I followed data source documentation:

Data source is provisioned by this configuration file:

datasources:
  - name: Flux_micrometer
    type: "influxdb"
    access: "proxy"
    url: "http://influx:8086"
    editable: true
    secureJsonData:
      token: "test:test"
    jsonData:
      version: Flux
      organization: ""
      defaultBucket: micrometer
      tlsSkipVerify: true
      timeInterval: "1m"                        

Open this data source configuration in Grafana:

Screenshot_2020-09-04 Flux_micrometer Settings - Grafana

Note that query language is set to InfluxQL rather than Flux. If I manually switch the query language to Flux, all fields are empty

Anything else we need to know?:

I am able to configure the data source using form the UI.

Screenshot from 2020-09-04 15-23-22

Thus, I expect that documentation is erroneous or something is wrong in provisioning.

I am also able to provision an InfluxQL based data source.

Environment:

  • Grafana version: 7.1.5
  • Data source type & version: InfluxDB (1.8) / Flux
  • OS Grafana is installed on: Docker image
@cykl
Copy link
Contributor Author

cykl commented Sep 4, 2020

#27011 reported another issue with Flux data source provisioning. Since it only complains about the token I expect that other fields are properly configured which is not what I observe. I tried to replicate #27011 using provided configuration and 7.1.1 and observed exactly the same behaviour that I reported in this issue.

@aknuds1 aknuds1 added datasource/InfluxDB/flux area/provisioning needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating labels Sep 4, 2020
@marefr
Copy link
Member

marefr commented Oct 7, 2020

I just tried your provided configuration at it works as expected for me on 7.2. Make sure that you include the apiVersion: 1 - did you?

apiVersion: 1

datasources:
  - name: Flux_micrometer
    type: "influxdb"
    access: "proxy"
    url: "http://influx:8086"
    editable: true
    secureJsonData:
      token: "test:test"
    jsonData:
      version: Flux
      organization: ""
      defaultBucket: micrometer
      tlsSkipVerify: true
      timeInterval: "1m"

@marefr
Copy link
Member

marefr commented Oct 12, 2020

Closing this due to lack of response. We'll consider reopen the issue if you provide more information.

@marefr marefr closed this as completed Oct 12, 2020
@cykl
Copy link
Contributor Author

cykl commented Nov 2, 2020

@marefr Sorry for this late response. Adding apiVersion: 1 indeed fixes the issue.

@marefr marefr added type/works-as-intended and removed needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating labels Nov 2, 2020
@caleb15
Copy link
Contributor

caleb15 commented Nov 20, 2020

Where do I get the proper token value? I'm presuming it's not literally "test:test"?

@caleb15
Copy link
Contributor

caleb15 commented Nov 30, 2020

Nevermind, I think the token value is username:password. It works now, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants