Logs with different values or fields (problem iam facing is to define Xpath in logstash xml filter because there is no fixed values or fields).
TRACE 2018/08/16 12:44:33.496034 Response XML is <zero_System_Interface version="1.0"><SystemService_Response version="1.0" name="GetTxnInfo"><Response_Info>0030No record found.01DECLINED000000000696Transaction Record not found</Response_Info></SystemService_Response></zero_System_Interface></receiver
TRACE 2018/08/16 12:45:33.496084 Response XML is <zero_version="1.0"><zero_System_Interface version="1.0"><SystemService_Response version="1.0" name="GetTxnInfo">0030No record found.01DECLINED000000000696Transaction Record not found</SystemService_Response></zero_System_Interface></zero_version>
@timestamp August 20th 2018, 09:51:42.715
t @version 1
t _id JpmRVWUBQofrep64Wv4us
t _index filebeat-2018.08.20
_score -
t _type doc
t beat.hostname grcentos
t beat.name grcentos
t beat.version 6.3.2
t host.name grcentos
t input.type log
t message TRACE 2018/08/16 12:44:33.496034 Response XML is <receiver_INTERFACE version="1.0"><receiver_System_Interface version="1.0"><SystemService_Response version="1.0" name="GetTxnInfo"><Response_Info>0030No record found.01DECLINED000000000696Transaction Record not found</Response_Info></SystemService_Response></receiver_System_Interface></receiver_INTERFACE>
offset 1,575
? parser.receiver_System_Interface {
"SystemService_Response": [
{
"version": "1.0",
"name": "GetTxnInfo",
"Response_Info": [
{
"HostDescription": [
"No record found."
],
"HostCode": [
"0030"
],
"ClassCode": [
"01"
],
"SystemDescription": [
"Transaction Record not found"
],
"SystemCode": [
"000000000696"
],
"ClassDescription": [
"DECLINED"
]
}
]
}
],
"version": "1.0"
}
? parser.version 1.0
t prospector.type log
t source /var/log/test.log
t tags beats_input_codec_plain_applied
The fields are there, they're just not rendered in the same way in Kibana. You can move fields with a mutate filter, but since the XML schema isn't fixed but somehow dynamic you'll have to use a ruby filter. In what way are the XML documents different?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.