Hi @sm0lda , so if I read you correctly, the issue for you is that the log structure is not always the same, and the pairs of variable=value could be in random order, but if it was always the same, you can use regex split to parse the logs, correct?
If that’s the case, I can help to enforce that the logs structure is the same by re-ordering the order.
As input, I have this:
It’s based on the example that you provided:
1st line: Same as what you have
2nd line: dhost and dmac moved at the beginning
3rd line: dst moved to 2nd position
Hi @sm0lda Just in case you struggle with regex split or that the logs might also not always have all of the elements on top of being ordered randomly, which would be a problem for regex split, I put something together for parsing the logs.
As some of you would know from my past posts, I would use JSON in this case, for “dynamic” variables, as Knime would dynamically create the proper columns automatically when converting from JSON to table.
Here’s the sample logs:
The first 3 lines are the same as before. For the new 3 lines:
Line 4: dhost is missing
Line 5: dst is missing
Line 6: everything is missing except for dst