mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
put worker log to ELK
This commit is contained in:
36
config/logstash.conf
Normal file
36
config/logstash.conf
Normal file
@@ -0,0 +1,36 @@
|
||||
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"] }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user