Skip to content

Instantly share code, notes, and snippets.

@drusellers
Created October 25, 2013 18:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drusellers/7159795 to your computer and use it in GitHub Desktop.
Save drusellers/7159795 to your computer and use it in GitHub Desktop.
iis and logstash
input {
stdin {}
file {
type => "iis"
path => "C:/inetpub/logs/LogFiles/W3SVC*/*.log"
}
}
filter {
if [message] =~ "^#" {
drop {}
}
#http://grokdebug.herokuapp.com/
grok {
match => ["message", "%{DATESTAMP:log_timestamp} %{IPORHOST:site} %{WORD:method} %{URIPATH:path} %{NOTSPACE:querystring} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:clienthost} %{NOTSPACE:useragent} %{NUMBER:response} %{NUMBER:subresponse} %{NUMBER:scstatus} %{NUMBER:timetaken}"]
}
}
output {
elasticsearch { embedded => true }
stdout { codec => rubydebug }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment