Skip to content

Instantly share code, notes, and snippets.

@MiteshShah
Forked from hrchu/gist:0cc5e783387f5453f528
Last active August 29, 2015 14:27
Show Gist options
  • Save MiteshShah/6879e09b6999d5c8e77c to your computer and use it in GitHub Desktop.
Save MiteshShah/6879e09b6999d5c8e77c to your computer and use it in GitHub Desktop.
logstash-grok-pattern-squid
# Follows the squid format in default:
# logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
# http://www.squid-cache.org/Doc/config/logformat/
%{NUMBER:timestamp}\s+%{NUMBER:response_time} %{IPORHOST:src_ip} %{WORD:squid_request_status}/%{NUMBER:http_status_code} %{NUMBER:reply_size_include_header} %{WORD:http_method} %{URI:request_url} %{USERNAME:user} %{WORD:squid_hierarchy_status}/%{IPORHOST:server_ip_or_peer_name} (?<mime_content_type>\S+\/\S+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment