We’re onboarding to Grafana from a different logging platform. One partner team found a way in the old platform to extract multiple values with a regex.
The use case is something like an XML log with multiple regex matches.
Something like
<Field>msg=Level: Warn, RefMessageError: ErrorString1</Field>
<Field>msg=Level: Warn, RefMessageError: ErrorString2</Field>
They’d like to produce a table per log, and have a row called “RefMessageError” that lists all values (in this case ErrorString1, ErrorString2
).
I’m pretty sure this isn’t possible with a single regex, but maybe there’s some other way someone can think of, maybe:
- a line-format expression?
- Some way to repeat a regex on different fields (even though they have the same name) in a structured document (in this case XML)?