I want to get the filename from the source value provided by filebeat.
output {
if [type] == "wxnumber" {
elasticsearch {
hosts => "localhost:9200"
sniffing => false
manage_template => false
index => "%{[source]}"
document_type => "%{[@metadata][type]}"
}
}
}
The %{[source]}
is usually like /aaa/bbb/ccc.log
. How do I set the index to the ccc.log
?