Este commit está contenido en:
Your Name
2020-05-27 17:46:42 +00:00
padre d5a1551995
commit cc05427130
Se han modificado 5 ficheros con 290 adiciones y 0 borrados

30
production/elk/nginx.conf Archivo normal
Ver fichero

@@ -0,0 +1,30 @@
input {
file {
path => "/access.log"
# start_position => "beginning"
mode => "tail"
file_completed_action => "log"
file_completed_log_path => "/dev/null"
}
}
filter {
if [path] =~ "access" {
mutate { replace => { "type" => "apache_access" } }
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "nginx"
document_type => "access_log"
}
# stdout { codec => rubydebug }
}