Skip to content

Instantly share code, notes, and snippets.

@alxschwarz
Created June 10, 2015 18:32
Show Gist options
  • Save alxschwarz/1c8fa0ecbfe8237bd077 to your computer and use it in GitHub Desktop.
Save alxschwarz/1c8fa0ecbfe8237bd077 to your computer and use it in GitHub Desktop.
nginx grok pattern
NGUSERNAME [a-zA-Z\.\@\-\+_%]+
NGUSER %{NGUSERNAME}
NGINXACCESS %{IPORHOST:clientip} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} (?:%{NUMBER:bytes}|-) (?:"(?:%{URI:referrer}|-)"|%{QS:referrer}) %{QS:agent} %{NUMBER:request_time} %{NUMBER:upstream_responce_time}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment