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!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...