I have problem with a configuration which is supposed to select only lines containing a specific text inside. The source is a json_line file. What I want is that only the messages matching a given string are processed, like:
So the type field is "PUSH_BODY"? Then then conditional should look like this:
if [type] == "PUSH_BODY" {
Otherwise, please show what an event that doesn't match the conditional actually looks like. Use a stdout { codec => rubydebug } output or copy/paste from the JSON tab in Kibana's Discover panel.
I removed relevant data because is traffic from real users, sorry for that. I can confirm there is no other record containing "PUSH_BODY" . Basically I tried to use the message as a whole line, which should be possible even if the codec is json. For completeness, the input looks like:
Basically I tried to use the message as a whole line, which should be possible even if the codec is json.
If you've used the json or json_lines codec to deserialize a JSON string into discrete fields the original JSON string won't get preserved unless you make a copy of the field first.
thanks again for the prompt answer... to my understanding: you mean the %{message} variable is emptied before of the filter , when the input has a codec of json?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.