mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
Add Logstash config to filter example Nginx logs
Signed-off-by: Jing Li <thyrlian@gmail.com>
This commit is contained in:
parent
20e68aa966
commit
c02d92a01c
4 changed files with 8168 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
|||
input {
|
||||
file {
|
||||
path => "/home/nginx.log"
|
||||
start_position => "beginning"
|
||||
sincedb_path => "/dev/null"
|
||||
}
|
||||
}
|
||||
|
||||
filter {
|
||||
json {
|
||||
source => "message"
|
||||
}
|
||||
geoip {
|
||||
source => "remote_ip"
|
||||
}
|
||||
useragent {
|
||||
source => "agent"
|
||||
target => "useragent"
|
||||
}
|
||||
}
|
||||
|
||||
output {
|
||||
elasticsearch {
|
||||
hosts => ["http://es:9200"]
|
||||
index => "nginx"
|
||||
}
|
||||
stdout {
|
||||
codec => rubydebug
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue