elasticsearch - Logstash If configuration dropping events -


i using elk stack save custom events. events pushing may or may not contain field called feed.name. using field dynamically set index, if doesn't exist want set unknown before sending elastic.

here full config have:

input {         http{                 host => "xxxxxxxxx"                 port => xxxx                 codec => "json"         } }  filter{         if ![feed.name]{                 mutate { add_field => { "feed.name"=> "unknown" }}         }         if [source.asn]{                 mutate { convert => {"source.asn" => "string"}}         }         if [destination.asn]{                 mutate { convert => {"destination.asn" => "string"}}         } }  output {         elasticsearch {                 hosts => ["xxxxxxxxx:xxxx"]                 index => "l-%{feed.name}-%{+yyyy.mm.dd}"         } } 

here problem: when there no feed.name set, logstash sets correctly , fine. however, if field exists, event seems dropped.

so 2 questions arise here: how behaviour explained? , also, how can make work (or there workarounds)?


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -