Hi all,
I try to drop the field "message" in logstash:
filter { if [type] == "test" { grok { match => {"message" => "%{TIMESTAMP_ISO8601:syslog_host_time} %{IP:client} %{WORD:severity} %{DATESTAMP_IOS:client_date}\: \%%{FACILITY_WORD:facility}-%{POSINT:int_severity}-%{WORD:mnemonic}: %{GREEDYDATA:short_message}"} add_tag => [ "test" ] match => { "path" => "%{YEAR:log_year}" } } mutate { add_field => { "@source" => "%{client}" } } dns { nameserver => "127.0.0.1" reverse => [ "@source" ] action => "replace" } date { timezone => "Europe/Paris" match => [ "client_date", "YYYY MMM dd HH:mm:ss z", "YYYY MMM dd HH:mm:ss.SSS 'CET'", "YYYY MMM dd HH:mm:ss.SSS 'CEST'", "Y } drop { remove_field => [ "message" ] } } }
But my problem is when I try that I have no more logs.
Do you know why ?
But it works when I remove the drop filter and I try with mutate filter like:
mutate { add_field => { "@source" => "%{client}" } remove_field => [ "message" ]` }
Thanks in advance for your answers,
Alex