Hello,
I'm using the xml filter plugin in logstash. Specifically, I've been using the xpath setting to parse my xml data into fields.
I wanted to know if it's possible for logstash to create the field I've defined in xpath, even if it doesn't exist in the xml (i.e. it's an option xml element or attribute).
For instance, consider the following xpath
"/filter/meta/@requires", "requires"
which places the requires xml attribute in the requires logstash field. However, I would like an empty requires logstash field created even if this attribute isn't present in the xml. I have a large set of elements/attributes in my xml that may or may not be present, so I'd like to do this the most efficient way possible.
Is there an xml filter setting that does this?
Thanks.