awesome-compose/elasticsearch-logstash-kibana/logstash/pipeline/logstash-nginx.config
Jing Li c02d92a01c Add Logstash config to filter example Nginx logs
Signed-off-by: Jing Li <thyrlian@gmail.com>
2020-07-24 02:32:09 +02:00

31 lines
399 B
Plaintext

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
}
}