QuestionQ130

VerifiedImplementation and Configuration

A customer is generating the following data in an XML file:

Question Image

What is the correct LINE_BREAKER for this data source?

Explanation

Because the XML events are written as one continuous stream with no linebreaks separating adjacent <SplunkEvent>...</SplunkEvent> records, a LINE_BREAKER built on the default newline pattern never finds a match and the source would be ingested as one giant event. Splunk's documented technique for this situation is to use a LINE_BREAKER regex containing an empty capturing group followed by a lookahead for the repeating tag that starts each record, so that Splunk splits the raw stream immediately before every occurrence of the tag without consuming any characters, correctly producing one event per SplunkEvent element.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!