This is my current config:
input {
redis {
host => "elasticsearch-logs.d3cexb.0001.euw1.cache.amazonaws.com"
port => 6379
key => "filebeat"
data_type => "list"
}
}
output {
if "nginx_access" in [type] {
elasticsearch {
pipeline => "weblog_combined"
}
}
if "nginx_access" in [type] {
elasticsearch {
pipeline => "weblog_nginx_error"
}
}
elasticsearch {
hosts => ["https://search-zego-es-56ebnsnz55kywk62l53h7kz6dq.eu-west-1.es.amazonaws.com:443"]
index => "filebeat-%{+YYYY.MM.dd}"
}
tcp {
host => "listener.logz.io"
port => 5050
codec => json_lines
}
}
What I want to get to work is to send all logs to the tcp endpoint(regardless of type) and if log is of type in if statement then send it to a pipeline in elasticsearch. If log is not of type specified in if statements then still send it to elasticsearch as it is.