I remove tags wield via mutate remove_fields statement.
Logstash 5.0.1 and 5.0.2 is not removing tags field.
Logstash 5.0.0 and 2.4.1 is removing tags field.
Logstash test config:
input { stdin { tags => ["test"] } }
filter { if "test" in [tags] { mutate { remove_field => [ "tags" ] } } }
output { stdout { codec => rubydebug } }
Input anything in stdin.
Output 5.0.2:
{
"@timestamp" => 2016-11-30T13:59:09.441Z,
"@version" => "1",
"host" => "vanilin",
"message" => "test",
"tags" => []
}
Output 5.0.1:
{
"@timestamp" => 2016-11-30T13:59:31.552Z,
"@version" => "1",
"host" => "vanilin",
"message" => "test",
"tags" => []
}
Output 5.0.0:
{
"@timestamp" => 2016-11-30T13:59:46.944Z,
"@version" => "1",
"host" => "vanilin",
"message" => "test"
}
Output 2.4.1:
{
"message" => "test",
"@version" => "1",
"@timestamp" => "2016-11-30T14:00:12.034Z",
"host" => "vanilin"
}
If I add --debug switch I see all versions try remove "tags".
[2016-11-30T17:07:41,463][DEBUG][logstash.filters.mutate ] filters/LogStash::Filters::Mutate: removing field {:field=>"tags"}
But 5.0.1 and 5.0.2 still leave field empty.
Look like something is changed if the grok message processing logic, is this field mandatory now?