I use Node Red to send data to InfluxDB. Originaly i used the InfluxDB nodes where i put a json object as a measurement. And there i could send a fieldvalue as a string.
But now i’m also using telegraf and i’m sending the data as Influx Line Protocol through the [[inputs.influxdb_listener]] plugin. And know every time i send my fieldvalue as a string it gives the following error:
The first one which comes through is with this line code:
But if i use the next one the error 400 appears:
Do i do something wrong? Also tried to put the text between ‘’
Thanks at advance!
After alot of websearching i found my problem. The stringvalue have to be double Quoted.
So the input looks like this:
I tried it only with ’ '. So close and yet so far
Just out of curiosity. If “tekst” means that everything between double quotes means a string value.
Why can’t you do the same with the Tag Value? Because if you have a space in your string then you have to put a \ before the space.
measurement,TagKey=“Tag Value” FieldKey=FieldValue ==> Error
measurement,TagKey=Tag\ Value FieldKey=FieldValue ==> Correct
Hi, all tags are stored as strings and don’t need to wrapped in double quotes. If you wrap them in quotes, you need to escape the double quotes. But, this will give you a tag value with the double quotes as part of it.
You have to escape the spaces in the values with \ otherwise influx will treat the second part of the value as a new field name.
As to why its implemented like that I couldn’t say.