Files
Phraseanet/config/logstash.conf
2020-04-24 20:27:11 +03:00

37 lines
612 B
Plaintext

input {
beats {
port => 5044
}
}
filter {
clone {
clones => ["to_stdout"]
}
if [type] == "to_stdout" {
#display only message field in the logstash stdout
prune {
whitelist_names => ["message"]
}
mutate {
add_field => { "[@metadata][type]" => "to_stdout" }
}
}
else {
mutate {
add_field => { "[@metadata][type]" => "to_elasticsearch" }
}
}
}
output {
if [@metadata][type][1] == "to_stdout" {
stdout {
codec => rubydebug
}
}
else {
elasticsearch { hosts => ["elasticsearch:9200"] }
}
}