美文网首页
Logstash nginx pattern

Logstash nginx pattern

作者: 挨踢的懒猫 | 来源:发表于2018-06-12 13:42 被阅读15次

    路径vim /usr/share/logstash/patterns/nginx:

    NGINXUSER %{EMAILADDRESS}|%{USER}
    NGINXERROR_DATE %{YEAR}[/-]%{MONTHNUM}[/-]%{MONTHDAY}
    
    # Log formats
    NGINX_COMMONLOG %{IPORHOST:clientip} %{NGINXUSER:ident} %{NGINXUSER:auth} \[%{HTTPDATE:timestamp}\] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-)
    NGINX_ACCESSLOG %{NGINX_COMMONLOG} %{QS:referrer} %{QS:agent} %{QS:x_forwarded_for}
    
    
    NGINX_ERRORLOG %{NGINXERROR_DATE:date} %{TIME:time} \[%{LOGLEVEL:loglevel}\] %{POSINT:pid}#%{NUMBER:tid}: %{GREEDYDATA:errormessage}(?:, client: %{IPORHOST:server})(?:, server: %{IPORHOST:server}?)(?:, request: %{QS:request})?(?:, upstream: (?<upstream>\"%{URI}\"|%{QS}))?(?:, host: %{QS:request_host})?(?:, referrer:\"%{URI:referrer}\")?
    

    相关文章

      网友评论

          本文标题:Logstash nginx pattern

          本文链接:https://www.haomeiwen.com/subject/vrileftx.html