Skip to content

Instantly share code, notes, and snippets.

@gt50
Created October 24, 2014 02:11
Show Gist options
  • Save gt50/89058c064adf6f6c78b0 to your computer and use it in GitHub Desktop.
Save gt50/89058c064adf6f6c78b0 to your computer and use it in GitHub Desktop.
iis.conf for logstash
input {
tcp {
type => "iis"
port => 3515
}
}
filter {
if [type] == "iis" {
grok {
#match => ["message", "%{TIMESTAMP_ISO8601:timestamp} %{IPORHOST:hostip} %{WORD:method} %{URIPATH:page} %{NOTSPACE:query} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:clientip} %{NOTSPACE:useragent} %{NOTSPACE:referrer} %{NUMBER:response} %{NUMBER:subresponse} %{NUMBER:scstatus} %{NUMBER:timetaken}"]
match => ["message", "%{TIMESTAMP_ISO8601:timestamp} %{IPORHOST:hostip} %{WORD:method} %{URIPATH:page} %{NOTSPACE:query} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:clientip} %{NOTSPACE:useragent} %{NUMBER:scstatus} %{NUMBER:scsubstatus} %{NUMBER:scwin32status} %{NUMBER:timetaken}"]
}
date {
match => [ "timestamp", "YYYY-MM-dd HH:mm:ss" ]
timezone => "Etc/UTC"
}
}
}
output {
if [type] == "iis" {
elasticsearch { host => localhost }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment