Hi all,
I am playing with Elastic stack through Docker containers (Filebeat -> Logstash Reciever -> Elasticsearch <- Kibana). Everything works pretty fine, but I have one problem.
Assuming the following logstash.conf file:
input {
beats {
port => 5044
}
}
filter {
if [docker][container][name] =~ /ucp/ {
mutate {
add_tag => ["system"]
}
}
else if [docker][container][name] =~ /dtr/ {
mutate {
add_tag => ["system"]
}
} else {
mutate {
add_tag => ["application"]
}
}
}
output {
if "system" in [tags] {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "infrastructure-%{+YYYY.MM.dd}"
}
} else if "application" in [tags] {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "application-%{+YYYY.MM.dd}"
}
} else {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "trash-%{+YYYY.MM.dd}"
}
}
}
I can not see containers logs in the "application-%{+YYYY.MM.dd}" Elasticsearch index.
The "infrastructure-%{+YYYY.MM.dd}" index recieves data normally !
Can anyone help me to understand what I am missing?
Thanks in advance!