Dashboards & Visualizations

Duplicated events indexing xml file

Cris
Explorer

Hi,

I've a simple xml file to index. The problem is that every time a new event is added the entire xml file is reindexed.
The reason is that the new event is added not at the end of the xml file but before the last line (xml closing tag).

Below the xml example file. You can see the header (first line), the footer (last line) and two events (between tag "Log"):

<?xml version="1.0" encoding="UTF-8"?><Sla>
<Log>
<Global>
<Target>DCxyz</Target>
<MethodName>FSE.pubblicDocument</MethodName>
<TrackID>141211804696927646</TrackID>
<Timestamp>01-10-2014 01:00:00</Timestamp>
</Global>
</Log>
<Log>
<Global>
<Target>DCxyz</Target>
<MethodName>FSE.pubblicDocument</MethodName>
<TrackID>141211809118823145</TrackID>
<Timestamp>01-10-2014 02:00:00</Timestamp>
</Global>
</Log>
</Sla>

Any idea to avoid this behaviour?

Thanks a lot.

Tags (3)
0 Karma
1 Solution

mcronkrite
Splunk Employee
Splunk Employee

You could break up the XML into individual events by the using Global xml tag.

In props.conf
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+) Global>
MAX_TIMESTAMP_LOOKAHEAD = 20
TIME_PREFIX = TIMESTAMP>
KV_MODE = xml

View solution in original post

0 Karma

mcronkrite
Splunk Employee
Splunk Employee

You could break up the XML into individual events by the using Global xml tag.

In props.conf
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+) Global>
MAX_TIMESTAMP_LOOKAHEAD = 20
TIME_PREFIX = TIMESTAMP>
KV_MODE = xml

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...