Skip to content

Instantly share code, notes, and snippets.

@msiegenthaler
Last active June 15, 2023 08:19
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save msiegenthaler/ed8172e2c2430076dbe38038cf833550 to your computer and use it in GitHub Desktop.
Save msiegenthaler/ed8172e2c2430076dbe38038cf833550 to your computer and use it in GitHub Desktop.
Grok pattern for nginx ingress in Kubernetes
%{IPORHOST:client_ip} - \[%{IPORHOST:x_forwarded_for}\] - %{DATA:client_identity} \[%{HTTPDATE:timestamp}\] \"(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|-)\" %{NUMBER:response} (?:%{NUMBER:bytes_sent;long}|-) (?:"(?:%{URI:referrer}|-)") %{QS:user_agent} %{NUMBER:request_length;long} %{NUMBER:response_time;double} %{DATA:upstream_proxy} %{NUMBER:upstream_bytes_sent;long} %{NUMBER:upstream_response_time} %{NUMBER:upstream_response}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment