Hello,
I'm using winlogbeats version 7.12 and it works great but I have a question.
In my windows log in message field I have an XML. What I would like to do is first check if in that XML in specific field there is a specified text and if yes then only store a subset of those XML fields.
What I do right now is that I'm using processor drop_event with condition: when -> not -> contains -> message: myStringToSearchFor
And then I have a processor script
sth like:
function process(event) {
var re = /<ResponseStatus>\w+<\/ResponseStatus>/;
var str = event.Get("message");
var myMatch = str.match(re);
if(myMatch){
event.Put("status", myMatch[0]);
}
event.Delete("message");
}
It is only an example with only one field (ResponseStatus) from my xml message extracted, in the future I would like to extract like 5-10 fields from it.
Still this code works quite well, but I'm not fully convinced that it will perform super fast.
I found decode_xml processor but when I put there configuration from documentation it didn't work with informatiion: parameter fields is missing.
- decode_xml:
fields: message
target_field: xml
ignore_missing: true
ignore_failure: true
So question is: do I use decode_xml in an inccorect way? If it would work would it be faster?

