Hello @Sajeel_Ahmed ,
What errors are you getting?
Can you upgrade to 2.x?
What environment are you running it in?
How are you trying to use Flux? Through the UI?
These resources might help:
Hi!
I had the same issue and I solved it by adding the following parameter to the influx cli : -path-prefix /api/v2/query
Now I can run flux queries through influx cli in InfluxDB 1.8. I hope this helps you,
Regards!
opened 08:21PM - 30 Jan 21 UTC
closed 07:04PM - 19 Aug 21 UTC
# Problem/Motivation
I am not able to use the flux query language (using chro… nograf, I did not test the CLI). I read that I have to enable flux first. Therefore I used the environment variable INFLUXDB_HTTP_FLUX_ENABLED to enable it. But it is still not working.
## Expected behavior
Using flux with chronograf should work.
## Actual behavior
I get the following error message in chronograf:
`400: Error flux not enabled: <nil>`
I can see the following output with log_level debug in the logs:
`[30/Jan/2021:21:08:05 +0100] 200 192.168.178.31, 172.30.32.1(172.30.32.2) GET /chronograf/v1/me HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0)
time="2021-01-30T21:08:06+01:00" level=debug msg=Request component=server method=POST remote_addr="127.0.0.1:57164" url=/api/hassio_ingress/C0cikYe5QGxOLmd4D8xjl7fwtjhdn5YQkXxt4nlfVIg/chronograf/v1/flux/ast
time="2021-01-30T21:08:06+01:00" level=info msg="Response: OK" component=server method=POST remote_addr="127.0.0.1:57164" response_time=8.079669ms status=200
[30/Jan/2021:21:08:06 +0100] 200 fe80::bde4:7d50:285d:7074, 172.30.32.1(172.30.32.2) POST /chronograf/v1/flux/ast HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0)
time="2021-01-30T21:08:06+01:00" level=debug msg=Request component=server method=POST remote_addr="127.0.0.1:57166" url="/api/hassio_ingress/C0cikYe5QGxOLmd4D8xjl7fwtjhdn5YQkXxt4nlfVIg/chronograf/v1/sources/0/proxy/flux?path=/api/v2/query?organization%3Ddefaultorgname"
time="2021-01-30T21:08:06+01:00" level=error msg="Error message Error flux not enabled: <nil>" component=server http_status =400
time="2021-01-30T21:08:06+01:00" level=info msg="Response: Bad Request" component=server method=POST remote_addr="127.0.0.1:57166" response_time="982.231µs" status=400
[30/Jan/2021:21:08:06 +0100] 400 192.168.178.31, 172.30.32.1(172.30.32.2) POST /chronograf/v1/sources/0/proxy/flux?path=/api/v2/query?organization%3Ddefaultorgname HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0)
time="2021-01-30T21:08:15+01:00" level=debug msg=Request component=server method=GET remote_addr="127.0.0.1:57168" url=/api/hassio_ingress/C0cikYe5QGxOLmd4D8xjl7fwtjhdn5YQkXxt4nlfVIg/chronograf/v1/me
time="2021-01-30T21:08:15+01:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:57168" response_time="271.143µs" status=200`
## Steps to reproduce
Here is my configuration:
auth: true
reporting: false
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
envvars:
\- name: INFLUXDB_HTTP_FLUX_ENABLED
value: 'true'
log_level: debug
I restarted the addon-on after the changes.
I can see that the environment variable is set:
[21:19:42] INFO: Kapacitor is waiting until InfluxDB is available...
[21:19:42] INFO: Chronograf is waiting until InfluxDB is available...
[21:19:42] DEBUG: Setting Env Variable INFLUXDB_HTTP_FLUX_ENABLED to true
[21:19:42] INFO: Starting the InfluxDB...