Hi everyone
I am trying to import IIS Logs, for now literally one field which is the date and time. Here is what my log file looks like:
#Software: IIS Advanced Logging Module
#Version: 1.0
#Start-Date: 2018-09-07 05:33:33.297
#Fields: date-local time-local
2018-09-07 07:33:32.841
2018-09-07 07:37:04.393
As you can see the last 2 lines are the date and time. I tested this pattern:
%{TIMESTAMP_ISO8601:iis_custom.advanced_logs.logtime}
online at http://grokconstructor.appspot.com and it passed using the below date and time in the log:
2018-09-07 07:33:32.841
But when I put it in filebeat I get the following error in Kibana (filebeat, started with the -e -d "*" flags are not giving me any errors. Only in Kibana can I see this error:
Provided Grok expressions do not match field value: [2018-09-07 07:53:14.908]
Below is my full filebeat ingest.json. Any help will greatly be appreciated!
Thank you
{
"description": "Pipeline for parsing custom iis logs",
"processors": [{
"grok": {
"field": "message",
"patterns":[
"%{TIMESTAMP_ISO8601:iis_custom.advanced_logs.logtime}"
],
"ignore_missing": true
}
},{
"remove":{
"field": "message"
}
}, {
"rename": {
"field": "@timestamp",
"target_field": "read_timestamp"
}
}, {
"date": {
"field": "iis_custom.advanced_logs.logtime",
"target_field": "@timestamp",
"formats": ["dd/MMM/YYYY:H:m:s Z"]
}
}, {
"remove": {
"field": "iis_custom.advanced_logs.logtime"
}
}],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}