Add Logstash config to filter example Nginx logs
Signed-off-by: Jing Li <thyrlian@gmail.com>
This commit is contained in:
8130
elasticsearch-logstash-kibana/logstash/nginx.log
Normal file
8130
elasticsearch-logstash-kibana/logstash/nginx.log
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user