Hey, My grok filter is working but not extracting and here is the logstash.conf
input {
beats {
port => 5044
}
}
filter {
if [type] == "iis" {
if [message] =~ "^#" {
drop {}
}
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:log_timestamp} %{WORD:S-SiteName} %{NOTSPACE:S-ComputerName} %{IPORHOST:S-IP} %{WORD:CS-Method} %{URIPATH:CS-URI-Stem} (?:-|\"%{URIPATH:CS-URI-Query}\") %{NUMBER:Port} %{NOTSPACE:CS-Username} %{IPORHOST:C-IP} %{NOTSPACE:CS-Version} %{NOTSPACE:CS-UserAgent} %{NOTSPACE:CS-Cookie} %{NOTSPACE:CS-Referer} %{NOTSPACE:CS-Host} %{NUMBER:SC-Status} %{NUMBER:SC-SubStatus} %{NUMBER:SC-Win32-Status} %{NUMBER:SC-Bytes} %{NUMBER:CS-Bytes} %{NUMBER:Time-Taken}"}
}
}
}
output {
elasticsearch {
hosts => ["locahost:5555"]
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}
and here is filebeat.config
filebeat.prospectors:
- input_type: log
paths:
- c:\inetpub\logs\LogFiles\W3SVC1\*.log
document_type: iis
output.logstash:
hosts: ["localhost"]
and kibana output:
@timestamp
July 12th 2017, 09:13:50.545
t @version
1
t _id
t _index
filebeat-2017.07.12
_score
-
t _type
log
t beat.hostname
symwork
t beat.name
symwork
t beat.version
5.4.0
t host
symwork
t input_type
log
t message
2017-07-12 14:12:59 W3SVC1 symworkflow ip POST /Green/WorkflowManagementService.asmx - 900- clientip HTTP/1.0 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+) - - b.p.com 500 1 1 900 700 9
offset
1,229,523
t source
c:\inetpub\logs\LogFiles\W3SVC1\u_ex170712.log
t tags
beats_input_codec_plain_applied
t type
log