InfluxDB 2.x: Error: Unsupported input type for mean aggregate (string to integer): Unterschied zwischen den Versionen
Aus Wiki-WebPerfect
Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „''My InfluxDB 2.x downsampling tasks could not run because of following error.'' == Error == '''Could not execute task run; Err: unsupported input type for me…“) |
Admin (Diskussion | Beiträge) |
||
(4 dazwischenliegende Versionen des gleichen Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
+ | <span style="color:red">'''THIS ERROR HAS NO SOLUTION RIGHT NOW, MORE INFORMATION IN THE GITHUB ISSUE: https://github.com/influxdata/influxdb/issues/20980'''</span> | ||
+ | |||
''My InfluxDB 2.x downsampling tasks could not run because of following error.'' | ''My InfluxDB 2.x downsampling tasks could not run because of following error.'' | ||
== Error == | == Error == | ||
− | '''Could not execute task run; Err: unsupported input type for mean aggregate: string: unsupported input type for mean aggregate: string''' | + | '''Could not execute task run; Err: unsupported input type for mean aggregate: string: unsupported input type for mean aggregate: string''' <br> |
+ | '''Unsupported input type for mean aggregate: string''' | ||
Zeile 12: | Zeile 15: | ||
Unfortunately InfluxDB 2.x has no solution for this (or I don't know about them). <br> | Unfortunately InfluxDB 2.x has no solution for this (or I don't know about them). <br> | ||
That's why we have to convert the type of the "_value" fields and rewrite this in a new measurement. <br> | That's why we have to convert the type of the "_value" fields and rewrite this in a new measurement. <br> | ||
− | *Optionally: Create a new bucket (I called them "typeconversion") | + | *Optionally: '''Create a new bucket''' (I called them "typeconversion") |
− | * | + | *Write a query that '''selects your measurement''', '''convert the values''' to integer and '''rewrite the data''' to your new bucket: |
− | + | <pre> | |
+ | datatoconvert = from(bucket: "telegraf") | ||
+ | |> range(start: v.timeRangeStart, stop: v.timeRangeStop) | ||
+ | |> filter(fn: (r) => r._measurement == "asset_vm_cmdb") | ||
+ | |> toInt() | ||
+ | datatoconvert | ||
+ | |> filter(fn: (r) => exists r._value) | ||
+ | |> to(bucket: "typeconversion", org: "<YOUR_ORG>") | ||
+ | </pre> | ||
+ | *Remove the old measurement | ||
+ | * | ||
Aktuelle Version vom 2. Dezember 2021, 09:06 Uhr
THIS ERROR HAS NO SOLUTION RIGHT NOW, MORE INFORMATION IN THE GITHUB ISSUE: https://github.com/influxdata/influxdb/issues/20980
My InfluxDB 2.x downsampling tasks could not run because of following error.
Error
Could not execute task run; Err: unsupported input type for mean aggregate: string: unsupported input type for mean aggregate: string
Unsupported input type for mean aggregate: string
Cause
This error occurs because of type conflicts in the same fields respectively in the value of it.
Solution / Workaround
Unfortunately InfluxDB 2.x has no solution for this (or I don't know about them).
That's why we have to convert the type of the "_value" fields and rewrite this in a new measurement.
- Optionally: Create a new bucket (I called them "typeconversion")
- Write a query that selects your measurement, convert the values to integer and rewrite the data to your new bucket:
datatoconvert = from(bucket: "telegraf") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "asset_vm_cmdb") |> toInt() datatoconvert |> filter(fn: (r) => exists r._value) |> to(bucket: "typeconversion", org: "<YOUR_ORG>")
- Remove the old measurement