mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
37 lines
612 B
Plaintext
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"] }
|
|
}
|
|
}
|