-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathiis-web.conf
executable file
·39 lines (39 loc) · 904 Bytes
/
iis-web.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
input {
file {
type => "iis-weblogs"
start_position => "beginning"
path => "/W3SVC1/u_ex*.log"
}
}
filter {
if ([message] =~ /^#/) {
drop { }
}
if [type] == "iis-weblogs" {
csv {
columns => ["date","time","s-ip","cs-method","cs-uri-stem","cs-uri-query","s-port","cs-username","c-ip","cs(User-Agent)","sc-status","sc-substatus","sc-win32-status","time-taken"]
separator => " "
remove_field => [ "sc-win32-status" ]
remove_field => [ "sc-substatus" ]
remove_field => [ "message" ]
}
mutate {
replace => [ "date", "%{date} %{time}" ]
remove_field => [ "time" ]
}
date {
match => [ "date", "YYYY-MM-DD HH:mm:ss" ]
target => [ "datetime"]
remove_field => [ "date" ]
}
geoip {
source => "s-ip"
}
}
}
output {
elasticsearch {
embedded => true
index => "iis-weblogs"
}
}