Getting Data In

BREAK_ONLY_BEFORE not working with XML input

badrsplunk
New Member

Hi,
I have an XML file input with the following form:

<data>
  <record>
   <field name="X" value="vX1">
   <field name="Y" value="vY1">
  </record>
  <record>
   <field name="X" value="vX2">
   <field name="Y" value="vY2">
  </record>
 </data>

In order to extract fields, I want to split this input to one event per each record. to do this, I tried this in props.conf:

      [sourcetype_name]
       ..
      BREAK_ONLY_BEFORE= (\<record\>)
      SHOULD_LINEMERGE = true

Unfortunately, it's not working for me.
Any ideas, please!

0 Karma

woodcock
Esteemed Legend

Don't use BREAK_ONLY_BEFORE, use this:

[YourSourcetypeNameHere]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n\s]+\<record\>[\r\n\s]+)
0 Karma

badrsplunk
New Member

Always not working!! no
search data indexed. It's like, when i try to size events, no data indexed.

0 Karma

woodcock
Esteemed Legend

These settings are correct, so it must be something else. If you are doing a sourcetype override/overwrite, you must use the ORIGINAL value, NOT the new value. You must deploy your settings to the first full instance(s) of Splunk that handle the events (usually either the HF tier if you use one, or else your Indexer tier) UNLESS you are using HEC's JSON endpoint (it gets pre-cooked) or INDEXED_EXTRACTIONS (configs go on the UF in that case), then restart all Splunk instances there. When (re)evaluating, you must send in new events (old events will stay broken), then test using _index_earliest=-5m to be absolutely certain that you are only examining the newly indexed events.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Your BREAK_ONLY_BEFORE value was eaten by the formatter. Please edit your question. To prevent the formatter from mangling the contents, indent each line of the props.conf file at least 4 spaces.

---
If this reply helps you, Karma would be appreciated.
0 Karma

codebuilder
Influencer

do you have kvmode=xml set?

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...