Hello @Anaisdg,
that you very much for your helpful reply and many hints. This topic I wrote 7 days ago and this is very much for a beginner in influxDB to improve/understand
According your recommendation, today I had my first success by executing a query in flux by using influxDB CLI.
Now I have to improve and get closer to my goal which is to have a query for a data range for today, yesterday, this month and last month. Challange for me is yesterday and last month. Because this is a relative period but no direct usage of now(). Guess I´ll have to build sth. using >=date.month(now) -1 < date.month(now) - 2 to query for last month.
I will have to investigate but I´m confident to do so. Switching from influxQL to Flux seems to be the only right decision.
Thanks also for recommending InfluxDB UI and guess haven´t used it before and will have a look.
To be honest having new problems to solve and do not know how.
Problem 1: Downsampling + Aggregation by Continuous Query is producing a mistake because of the time stamp which is used by aggregations like integral(). see topic.
Second topic. Why does this query work well:
influx -type=flux -path-prefix /api/v2/query -username user -password 123 -execute ‘from(bucket:“longterm”) |> range(start: -5h) |> filter(fn: (r) => r._measurement == “javascript.0.scriptEnabled.PV.WRPACges”) |> integral()’
And this query gives back an error:
influx -type=flux -path-prefix /api/v2/query -username user -password 123 -execute ‘from(bucket:“longterm”) |> range(start: -5h) |> filter(fn: (r) => r._measurement == “javascript.0.scriptEnabled.PV.WRPACges”) |> sum()’
Only difference is using sum() instead of integral(). Without using aggegation the output is a list of 5 datapoints each having a float value. The result for integral is right but i need sum(). sum() gives error:
unknown server error: 500 Internal Server Error
I do not understand why…
Thank you very much!