Hey there,
New to ELK and I was trying to parse the following xml file:
<msg time='2018-09-04T20:47:31.182+01:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='HHHHH'
host_addr='XXX.XX.XXX.X' pid='YYYY' version='1'>
<txt>Creating new log segment:
</txt>
</msg>
I have the following logstash config file:
input {
beats {
port => 5044
}
if "xml" in [tags] {
codec => multiline {
pattern => "<msg time"
negate => "true"
what => "next"
}
}
}
filter {
else if "xml" in [tags] {
xml {
source => "message"
store_xml => false
xpath => [
"/msg/text()", "msg_xml",
"/msg/txt/text()", "txt_xml"
]
}
}
}
Shouldn't it be working? The fields won't parse...