Change type from string to integer

@scott Right now I try to update my InfluxDB from 2.0.2 to 2.0.4 on my RHEL 8 but there is an conflict because of the package renaming (Release Announcement: InfluxDB OSS 2.0.3 | InfluxData).
How to update InfluxDB 2.0.2 to 2.0.4 without losing my data?

You can backup your data that’s on disk. Everything InfluxDB v2 related is stored in:

/var/lib/influxdb2
/etc/influxdb2

Upgrade the package, then just drop those files/directories back in place and you should be gtg.

1 Like

Actually, it may also be in ~/.influxdbv2 depending on how you installed InfluxDB.

@scott I have another InfluxDB v 2.0.4 running with the same data but the issue is still there. Are you sure this is not a bug?

@fluxator, it may be a bug, but I don’t know what’s triggering it. Your query is really basic and shouldn’t cause the UI to hang like that. The only thing I can think of is that the query is returning too many points and is having to store them in memory.

This isn’t a solution to your datatype problem, but may help identify the reason the dashboard is hanging. Try running:

from(bucket: "telegraf")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r._measurement == "asset_vm_cmdb")
    |> aggregateWindow(every: v.windowPeriod, fn: last)
    |> toInt()

@scott unfortunately this query also runs in a “timeout” or whatever.
Even when I run the query only for one dataset/interval (approx. 2800 rows).

@fluxator Then this is likely a bug. I don’t know if it’s with the InfluxDB UI or with Flux, but you should create an issue on either the InfluxDB repo or the Flux repo. Provide as much detail as you can, including sample data, any errors you’re seeing in the browser or from InfluxDB, etc.

@scott thanks for your time :slight_smile:
I opened a Github issue right now.

Any news or tips? (This is really important for us)

Do you get any results if you add a _field filter along with the _measurement filter?

Unfortunately because of the bucket retention we now don’t have data with wrong type.
So this is a little bit a happy news, but confusing is that the Influx tasks are running in an error:

→ My question is: Why the Influx tasks are running in an error?, because I can’t see data with the wrong data type anymore?

There is some field being returned by that query that has the string type and mean() can’t average string values. Is there any chance that some string values still remain?

No I don’t think I have still strings.

Whats the fastest way to check if I have string in “_value” over all _measurements?