Managed to get simulation works with multiple patterns but can't see the data in kibana.
I added two new fields (log.controller & log.controllerMessage to index template. index pattern in kibana shows the 2 new fields but they can't be searchable and that pattern with controller doesn't work as there are no docs with that pattern in Kibana
{
"pipeline": {
"description" : "parse multiple formats MP app logs",
"processors": [
{
"gsub": {
"field": "message",
"pattern": "\n",
"replacement": "\\n"
}
},
{
"grok": {
"field": "message",
"trace_match": true,
"patterns":["%{TIMESTAMP_ISO8601:log.datetime} %{DATA:log.level} \[%{DATA:.log.thread}\] controller:\|%{DATA:log.controller}\| %{GREEDYDATA:log.controllerMessage}",
"%{TIMESTAMP_ISO8601:log.datetime} %{DATA:log.level} \[%{DATA:log.thread}\] %{GREEDYDATA:log.message}"
],
"on_failure": [
{
"set":{
"field": "ingestError",
"value": "{{ _ingest.on_failure_message }}"
}
},
{
"set":{
"field": "log.datetime",
"value": "{{ @timestamp }}"
}
},
{
"date": {
"field":"log.datetime",
"target_field":"log.datetime",
"formats": ["yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"]
}
}
]
}
}
]
},
"docs":[
{
"_source": {"message":"2017-10-04 18:21:55 ERROR [29] controller:|DM.Marketing.Platform.Deal.V1.Controllers.EligibilityController| DM.Marketing.Platform.Deal.V1.Domain.DeskingProviderNotFoundException: No desking provider has been assigned to this deal (9aac0c8e-a099-449e-9119-c79dbf937abc)."}
},
{
"_source": {"message":"2017-10-04 20:24:36 ERROR [18] controller:|DM.Marketing.Platform.Deal.V1.Controllers.DealJacketExtensionController| System.AggregateException: One or more errors occurred. ---> System.Exception: GetAsync Exception, Url: api/vehicle/v2/inventory?bac=112093&vin=1GNSCBKC1FR507889&sellingsource=13&bfc=01&sourceZip=&destinationZip=&webId=&type=New&userId=, Response Content: "}
},
{
"_source": {"message":
"2017-09-27 03:21:40 ERROR [28] Application Error System.Web.HttpException (0x80004005): The controller for path '/2014/products/9' was not found or does not implement IController."}
},
{
"_source": {"message":"2017-10-09 04:00:48 ERROR [27] GetAsync Exception, Url: api/vehicle/v2/inventory?bac=112093&vin=1GNSCBKC1FR507889&sellingsource=13&bfc=01&sourceZip=&destinationZip=&webId=&type=new&userId= System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found). \n at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() "}
}
]
}