fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.73k stars 1.56k forks source link

Influxdb output does not handle integer value correctly #9120

Closed jcdauchy-moodys closed 1 week ago

jcdauchy-moodys commented 1 month ago

Bug Report

Describe the bug If value is an integer, using Influxdb line protocol, we should suffix the value with an "i", this is not the case, so all values are sent as float

create a measurement in influxdb database with a column of type integer, then push some data as integer type in fluentbit, your data will not be pushed.

Expected behavior

Screenshots

[2024/07/22 12:55:13] [error] [output:influxdb:influxdb.1] http_status=400 {"error":"partial write: field type conflict: input field \"myintergerfiled\" on measurement \"test\" is type integer, already exists as type float dropped=5"}

Your Environment

Influxdb output

Additional context

I tried to push a log to an influxdb measurement already created with an integer column type and it was complainging that my value is FLOAT :

jcdauchy-moodys commented 1 month ago

I will try to fix it soon.

Athishpranav2003 commented 1 month ago

@jcdauchy-moodys are you working on this or can i make a PR for this real quick? I guess i understood the problem here but just need to make sure if you are working on this currently

cosmo0920 commented 2 weeks ago

Hi, I'm tried to create a patch for fixing this: https://github.com/fluent/fluent-bit/pull/9301 Could you add a reproducible steps for this issue?