Hi.
We're in the process of starting to use Elastic for logging in our integration platform. When sending to Elastic through the ingest-attachment pipeline the payload in attachment.content field is only showing the values from the elements instead of the entire xml tree. Is there any way of solving this or is that just the way the attachment pipeline parses the xml? When sending a JSON in the payload the entire tree is present not just the values. Since we are just the intermediator here we will not be in control of what is sent in the payload.
Processor definition:
{
"description" : "Extract payload information",
"processors" : [
{
"attachment" : {
"field" : "payload",
"target_field" : "attachment"
}
}
]
}
Message to log:
{
"timestamp": "2018-02-22T09:57:00.654+01:00",
"brokername": "TESTNODE",
"executiongroup": "default",
"appname": "TEST_APPLICATION",
"flowname": "TEST_APPLICATION_SendToElastic",
"loglevel": "INFO",
"logtext": "testing log functionality",
"metadata": "test",
"exceptionList": "",
"payload": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxDcmVhdGVSZXF1ZXN0IHhtbG5zPSJodHRwOi8vdGVzdC5vcmcvVGVzdC9DcmVhdGVSZXF1ZXN0LzEuMCI+DQogICAgPEhlYWRpbmc+aGVhZGluZ1N0cmluZzwvSGVhZGluZz4NCiAgICA8RGVzY3JpcHRpb24+ZGVzY3JpcHRpb25TdHJpbmc8L0Rlc2NyaXB0aW9uPg0KICAgIDxQcmlvcml0eT5wcmlvcml0eVN0cmluZzwvUHJpb3JpdHk+DQogICAgPFN0YXR1cz5zdGF0dXNTdHJpbmc8L1N0YXR1cz4NCjwvQ3JlYXRlUmVxdWVzdD4="
}
Resulting JSON in Elastic:
{
"_index": "pipeline-test",
"_type": "logs",
"_id": "nim7vGEBEcr_2DAurAfm",
"_version": 1,
"_score": null,
"_source": {
"metadata": "test",
"brokername": "TESTNODE",
"exceptionList": "",
"executiongroup": "default",
"appname": "TEST_APPLICATION",
"attachment": {
"content_type": "application/xml",
"language": "no",
"content": "headingString\n descriptionString\n priorityString\n statusString",
"content_length": 83
},
"payload": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxDcmVhdGVSZXF1ZXN0IHhtbG5zPSJodHRwOi8vdGVzdC5vcmcvVGVzdC9DcmVhdGVSZXF1ZXN0LzEuMCI+DQogICAgPEhlYWRpbmc+aGVhZGluZ1N0cmluZzwvSGVhZGluZz4NCiAgICA8RGVzY3JpcHRpb24+ZGVzY3JpcHRpb25TdHJpbmc8L0Rlc2NyaXB0aW9uPg0KICAgIDxQcmlvcml0eT5wcmlvcml0eVN0cmluZzwvUHJpb3JpdHk+DQogICAgPFN0YXR1cz5zdGF0dXNTdHJpbmc8L1N0YXR1cz4NCjwvQ3JlYXRlUmVxdWVzdD4=",
"loglevel": "INFO",
"flowname": "TEST_APPLICATION_SendToElastic",
"logtext": "testing log functionality",
"timestamp": "2018-02-22T09:57:00.654+01:00"
},
"fields": {
"timestamp": [
"2018-02-22T08:57:00.654Z"
]
},
"sort": [
1519289820654
]
}
As you can see above the resulting JSON only has values in the content:
"content": "headingString\n descriptionString\n priorityString\n statusString"
Tried setting the content_type to "text/plain" with the set processor to try and avoid the parsing but that didn't help.