I’m trying to import a package within the Flux plugin on chronograf.
Actually, I’m just interested in using “date” package.
For that, I put the following statement at the beginning of the query:
import "date"
However, an error occurs when running the query saying the import path “date” is unknown.
The same happens for the “math” package.
What is even stranger is the fact to be able to use math directly without import.
But this doesn’t hold for “date” package…
I failed to find any information about this behavior on internet.
We are using 1.7.9 for influxDb But I do not know which version we have for flux and I think that it is the problem. Do you know how can we retrieve the flux version?
Yes I read that. But I am not sure that it is really the 0.50 . Is it possible that when I upgrade influxdb the flux version did not upgrade? I did some test and import math for example seems working while import date or import runtime does not work… It is like the flux version is not the good one
with influx -type=flux the command import “date” works
with grafana and the flux plugin or with chronograf, the import “date” does not work. The error is "error “error in evaluating AST while starting program: type error 1:1-1:14: unknown import path: ““date”””
It worked for me when I tested with the same version of chronograf of course the only difference was OS.
Its odd that in your case, it does not seem to recognize the latest flux and throwing the same error as i got when tested with 1.7.8.
May be try resinstalling and/or restart services.
I try on a docker with the last version for chronograf and influxdb and it seems to work. Therefore it is really a problem coming from the upgrade of influxdb. So what is the good process to do without lose all the data and the configuration?
Flux is packaged with InfluxDB, so when you upgrade InfluxDB, you should get a newer version of Flux. It looks like an issue with the AST that Chronograf is submitting to the Flux engine, so may be a Chronograf issue, although I’m testing with 1.7.17 on macOS and it’s working…
For your information:
By rebooting the server, it seems that the problem has been corrected… If you want to explain the problem on a issue github, let’s me know.