-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
String field with backslash quote results in unable to parse error #8728
Comments
It looks like you are escaping the slash before the quotes. Try:
Or if the first slash is supposed to there, try:
|
The backslash and quote are both supposed to be there. I can definitely change Telegraf to escape/unescape backslashes within string fields, but I want to make sure it is correct since this is not what is documented and it needs to work with Kapacitor and the Telegraf read side. |
It looks like those docs are incorrect for strings escaping (and have been since 0.9.4). Backslashes need to be escaped within string fields. Here are some example tests we have for that case: https://github.com/influxdata/influxdb/blob/master/models/points_test.go#L1300 This is the commit that added support for backslashes in strings: 6ca7970#diff-4fbf62c788a5b69da86ec473a6f13f22 |
I'm assuming this is now resolved. |
I think there should be a documentation update to close this. |
@danielnelson an issue should be opened on the docs repo to track this. |
How can I use whitespace in BASH variable? Example:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions. |
Bug report
When sending a string field containing a literal
\"
, I receive a unable to parse error if there is also a space in the field. I believe the line protocol is being escaped correctly, only the double quote character is backslash escaped within the quotes, the other backslashes are literals.System info:
InfluxDB 1.3.3
Steps to reproduce:
Expected behavior:
204 No Content
Actual behavior:
Additional info:
This quoting allows for correct parsing:
foo bar="\\\"howdy doody\\\"" 1503364403083465901
, but is incorrect according to https://docs.influxdata.com/influxdb/v1.3/write_protocols/line_protocol_reference/#special-charactersThis is the root cause of influxdata/telegraf#3142
The text was updated successfully, but these errors were encountered: