2018-01-30 logstash grok nginx 错误日志

1、nginx错误日志格式

2018/01/29 09:23:46 [error] 47257#0: *20123469 open() "/data/wwwroot/soufeel-com-project/skin/frontend/smartwave/porto/css/responsive.css" failed (2: No such file or directory), client: 172.31.10.121, server: www.soufeel.com, request: "GET /skin/frontend/smartwave/porto/css/responsive.css HTTP/1.1", host: "www.soufeel.com.my", referrer: "http://www.soufeel.com.my/inner-senses-stopper-charm-925-sterling-silver.html"
2018/01/29 09:38:12 [error] 69578#0: *20134621 open() "/data/wwwroot/soufeel-com-project/skin/frontend/smartwave/default/fonts/fonts/fonts/fonts/ProximaNova-Regular.svg" failed (2: No such file or directory), client: 172.31.20.224, server: www.soufeel.com, request: "GET /skin/frontend/smartwave/default/fonts/fonts/fonts/fonts/ProximaNova-Regular.svg HTTP/1.1", host: "www.soufeel.com"

2、修改logstash配置文件

input {
     file {
          path => ["/nginx/error.log"]
          start_position => "beginning"
           }
}

filter {
      grok {
              match => [
            "message", "(?

你可能感兴趣的:(2018-01-30 logstash grok nginx 错误日志)