nginx 错误日志格式的正则匹配,filebeat

nginx 错误日志格式:

2018/08/25 11:23:36 [error] 28388#0: *14549 open() "/var/www/zjzc-web-frontEnd/images/account/profitBttom2.png" failed (2: No such file or directory), client: 10.168.102.19, server: localhost,

request: "GET /images/account/profitBttom2.png HTTP/1.1", host: "wenjinbao.winfae.com", referrer: "https://wenjinbao.winfae.com/products/productList.html"

 

filter {

grok {

match => [ "message" , "(?%{YEAR}[./-]%{MONTHNUM}[./-]%{MONTHDAY}[- ]%{TIME}) \[%{LOGLEVEL:severity}\] %{POSINT:pid}#%{NUMBER}: %{GREEDYDATA:errormessage}(?:, client: (?

%{IP}|%{HOSTNAME}))(?:, server: %{IPORHOST:server}?)(?:, request: %{QS:request})?(?:, upstream: (?\"%{URI}\"|%{QS}))?(?:, host: %{QS:request_host})?(?:, referrer:

\"%{URI:referrer}\")?"]

}

}

你可能感兴趣的:(nginx)