Add_tag failed

Hello,

I want to ship logs from different log source. I need to add a tag to each different log sources.
This conf doesn' t work !

input {
beats {
port => 5044
}
}

filter {
if [ source ]=="xxx.log" {
mutate {
add_tag => [ "Gvrs" ]
}
}
if [ source ]=="xxx.log" {
mutate {
add_tag => "Demo"
}
}
}

output {
gelf {
host => "xxx.xxx.xxx.xxx"
port => 5044
protocol => "udp"
}
}

When you say it doesn't work, is the add_tag just not adding the tag, or is it generating an error? Either way, have you tried making the tags lower-case (that is, "gvrs" and "demo")?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.