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

Special characters not supported in delimiter of json_lines codec #36

Open
conet opened this issue Oct 29, 2018 · 1 comment
Open

Special characters not supported in delimiter of json_lines codec #36

conet opened this issue Oct 29, 2018 · 1 comment

Comments

@conet
Copy link

conet commented Oct 29, 2018

According to the documentation of json_lines codec plugin 2 the default value of the delimiter option is newline (\n). However, when \n (or other unicode/special character like \x00) is explicitly defined in the input configuration of Logstash, it is considered to be a string containing of two characters:\ and n.

See this thread:
https://discuss.elastic.co/t/special-characters-not-supported-in-delimiter-of-json-lines-codec/114560

I encountered this around 5.2 and was surprised to see that it is still an issue in 6.4.2.

@conet
Copy link
Author

conet commented Oct 29, 2018

I would like to use the plugin like this:

output {
    tcp {
	codec => json_lines { 
          delimiter => "\0"
        }
...
    }
}

But I end up with:

{...}\0{...}

instead of the actual \0 character, the same is true for any special characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant