Skip to content

Instantly share code, notes, and snippets.

@QuduSEC
Last active June 16, 2017 14:52
Show Gist options
  • Save QuduSEC/3854214409aea29ccd8c7b93417fe9df to your computer and use it in GitHub Desktop.
Save QuduSEC/3854214409aea29ccd8c7b93417fe9df to your computer and use it in GitHub Desktop.
NG_ACCESS %{IPORHOST:remote_ip} %{DATA:username} \[%{HTTPDATE:timestamp}\] "%{WORD:method} %{URIPATHPARAM:request} HTTP/%{NUMBER:http_version}" %{NUMBER:response_code} (?:%{NUMBER:bytes}|-) "%{DATA:referrer}" "%{DATA:useragent}" "%{DATA:gzip_ratio}" \[HEADERS\]: "%{DATA:requestid}" "%{MSISDN:msisdn}" "%{DATA:msisdn_valid}" \[HOST\]: "%{DATA:protocol}" "%{DATA:domain}" "%{DATA:port}" \[UPSTREAM\]: "%{DATA:upstream_ip}" "%{DATA:upstream_status}" \[TIME\]: "(?:%{DATA:request_time}|-)" "(?:%{DATA:upstream_response_time}|-)" \[CACHE\]: "%{DATA:cache}"
NG_ERROR %{DATESTAMP:timestamp} \[%{LOGLEVEL:severity}\] %{POSINT:pid}#%{NUMBER}: \*%{NUMBER} %{GREEDYDATA:errormessage}(?:, client: %{IPORHOST:remote_ip})(?:, server: %{IPORHOST:ng_server})(?:, request: "%{WORD:method} %{URIPATHPARAM:request} HTTP/%{NUMBER:http_version}")?(?:, upstream: \"%{DATA:upstream_url}\")?(?:, host: \"%{DATA:domain}\")?(?:, referrer: \"%{DATA:referrer}\")?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment