오픈소스/nginx

logstash for nginx

세모데 2018. 2. 2. 18:35

input { 

    file { 

        type => nginx_access 

        path => ["/var/log/nginx/*-access.log"] 

    } 

 

filter { 

    grok { 

        match =>{"message" => "%{COMBINEDAPACHELOG}" } 

    } 

 

output { 

    elasticsearch { hosts => ["192.168.50.5:9200"] } 

    stdout { codec => rubydebug }