Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis Timeseries' TS.ADD only accepts numeric values. #14058

Closed
aurangzeb099 opened this issue Oct 6, 2023 · 7 comments · Fixed by #14060
Closed

Redis Timeseries' TS.ADD only accepts numeric values. #14058

aurangzeb099 opened this issue Oct 6, 2023 · 7 comments · Fixed by #14060
Assignees
Labels
bug unexpected problem or unintended behavior

Comments

@aurangzeb099
Copy link

Relevant telegraf.conf

[[outputs.redistimeseries]]
  ## The address of the RedisTimeSeries server.
  address = "127.0.0.1:6379"

Logs from Telegraf

ERROR:
 Error writing to outputs.redistimeseries: adding sample failed: ERR TSDB: invalid value

System info

Telegraf 1.27.3 , Docker version 23.0.1,

Docker

No response

Steps to reproduce

1.telegraf outputs to redistimeseries
2. docker image for redis-stack
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
3. example metric .
saTable,agent_host=172.16.30.244,host=localhost.net,index=1,saRowId=1 saError=167968771i,saSerialNumber="0",saVer="49.50",saStatus=0i,saMac="00:0l:d3:01:d7:38", 1696489223000000000
...

Expected behavior

String and integer should store in redistimeseries.

Actual behavior

it seems like Redis Timeseries' TS.ADD only accepts numeric values. In your example metric all fields except saMac can be converted or represented by numeric values. Some by accident like saVer or saSerialNumber which are strings but contain "numeric-like" values.

Additional info

No response

@aurangzeb099 aurangzeb099 added the bug unexpected problem or unintended behavior label Oct 6, 2023
@srebhan
Copy link
Member

srebhan commented Oct 6, 2023

@aurangzeb099 can you please test the binary in PR #14060 available as soon as CI finishes the tests successfully! Please let me know if this fixes your issue!

@srebhan srebhan self-assigned this Oct 6, 2023
@Hipska
Copy link
Contributor

Hipska commented Oct 11, 2023

Normally, if your fields have the wrong datatype, you should use the processors.converter plugin.

@srebhan
Copy link
Member

srebhan commented Oct 11, 2023

That's true, however the current behavior of the plugin has to be preserved and that's "autoconvert"...

@Hipska
Copy link
Contributor

Hipska commented Oct 11, 2023

Does it? Isn’t that why this issue is created?

@Hipska
Copy link
Contributor

Hipska commented Oct 17, 2023

@srebhan?

@srebhan
Copy link
Member

srebhan commented Oct 23, 2023

No. Currently the "string" of the value is just appended to the TS.ADD command, so it works it it is a float or integer or a string of a float or integer! The plugin fails if the value is a true string like "abc" but works if the value is a string like "1.23"...

@Hipska
Copy link
Contributor

Hipska commented Oct 23, 2023

Okay, but that is only after implementation of #14060 right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants