Skip to content

Instantly share code, notes, and snippets.

@RobertoFlores
Forked from thejuan/IIS Logstash Grok
Created January 1, 2018 20:23
Show Gist options
  • Save RobertoFlores/cad572669dadbddda5f61dbf4fb783bd to your computer and use it in GitHub Desktop.
Save RobertoFlores/cad572669dadbddda5f61dbf4fb783bd to your computer and use it in GitHub Desktop.
A Logstash Grok filter for IIS (W3C default fields + bytes sent)
filter{
grok {
match => ["message", "%{TIMESTAMP_ISO8601:log_timestamp} %{WORD:iisSite} %{IPORHOST:site} %{WORD:method} %{URIPATH:page} %{NOTSPACE:querystring} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:clienthost} %{NOTSPACE:useragent} %{NOTSPACE:referer} %{NUMBER:response} %{NUMBER:subresponse} %{NUMBER:scstatus} %{NUMBER:bytes:int} %{NUMBER:timetaken:int}"]
}
}
@RobertoFlores
Copy link
Author

RobertoFlores commented Jan 1, 2018

#iis version 8.5
filter{
grok {
match => ["message","%{DATE:date} %{TIME:time} %{IPORHOST:s-ip} %{WORD:cs-method} %{NOTSPACE:cs-uri-stem} %{NOTSPACE:cs-uri-query} %{NUMBER:s-port} %{NOTSPACE:cs-username} %{IPORHOST:c-ip} %{NOTSPACE:cs(User-Agent)} %{NOTSPACE:cs(Referer)} %{NUMBER:sc-status} %{NUMBER:sc-substatus} %{NUMBER:sc-win32-status} %{NUMBER:time-taken:int}"]
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment