I have been trying various combinations of patterns to get IIS logs parsed, but have been unsuccessful in getting the patterns to match. I can get apache logs to parse perfectly fine, even with geoip. But I just can't get IIS logs to parse.
Here's the pattern I am trying:
%{TIMESTAMP_ISO8601:timestamp} %{IPORHOST:site} %{WORD:http_method} %{URIPATH:page} %{NOTSPACE:qu ery_string} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:client_host} %{NOTSPACE:useragent} %{NUMBER:http_response} %{NUMBER:sub_response} %{NUMBER:sc_status} %{NUMBER:time_taken}
When I use grok debugger, I can see it parse the IIS log lines perfectly fine. But it does not work on logstash.
For testing, I have just put this in the match:
%{TIMESTAMP_ISO8601:timestamp}
No luck.
Then I tried:
"%{TIMESTAMP_ISO8601:timestamp} %{GREEDYDATA:badiisdata}
No luck.
Then I tried:
%{GREEDYDATA:badiisdata}
I do not get grok parse error. But I do not get the badiisdata field in the index.
It does not look like parser is getting passed the timestamp.
I have tried pasting some log files in the grokconstructor, it does not give me any pattern either.
Here's an example output with the grokparse failure:
{
"_index": "logstash-retailash-webserver-2015.11.17",
"_type": "iis",
"_id": "AVEWZvBcuwpPq9jVdNfv",
"_score": null,
"_source": {
"message": "2015-10-19 02:37:18 10.187.XXX.YYY GET /mobility_details.html - 80 - 10.230.XXX.YYY Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+Trident/5.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C;+.NET4.0E;+InfoPath.3;+Tablet+PC+2.0;+MS-RTC+LM+8) 302 0 0 3203",
"@version": "1",
"@timestamp": "2015-11-17T17:03:41.120Z",
"count": 1,
"fileinfo": {},
"group": "webserver",
"input_type": "log",
"line": 66,
"offset": 19585,
"shipper": "xxxxxx",
"source": "C:\\inetpub\\logs\\LogFiles\\W3SVC14\\u_ex151019.log",
"system": "retailash",
"tags": [
"filebeat",
"iis",
"_grokparsefailure"
],
"type": "iis",
"year": "2015",
"month": "11",
"day": "17"
},
"fields": {
"@timestamp": [
1447779821120
]
},
"sort": [
1447779821120
]
}
I am using Logstash 2, File Beat 1rc1. freshly downloaded and plugins updated today. Plugin: logstash-input-beats (0.9.6)
Please help!