Logstash - json filter removes backslash

Hello,
When I am doing a json filter in my logstash file, in fields where I have two backlashes ("\") one of them is removed. Why this is happening? Besides replacing \ to \, what can I do?

Thank you.

Can you show an example of the json? Please indent it by 4 spaces, otherewise the backslashes will not display correctly.

Where are you seeing one of the backslashes has been removed?

In the original file I have "XYZ\\ABC", but when I use the json filter and inserting those data in elastic, I have "XYZ\ABC" (one backslash is lost). I tried to use: mutate { gsub => ["robotName","\","\\"]}
But, appears the error: Expected one of #, {, ,, ] at line...
How can I do to replace the backslash? Another way to use the gsub?

Can you show the complete error message and configuration? The error message does tell you exactly where in the configuration the problem is.

When I insert the gsub, everything it was fine, but I save and run and some character appears in the gsub. I tried to delete but it appears again. I fixed using the gsub in ruby code. Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.