Dashboards & Visualizations

How to configure XML tags as search parameters when a single log file contains multiple XML events?

vinaykumar2020
New Member

Hi,

We just started working on Splunk. We have a single log file with multiple XMLs with line breaker ####################### as below (Build with same schema). We need some help on configuring XML tags as search parameter.

<?xml version='1.0'?> 
 <Log>
         <HOST>127.0.0.1</HOST>
         <DATE>10-04-2016T12:12:12</DATE>
         <TRANSACTIONID>OpportunityId</TRANSACTIONID>
         <TRANSACTIONVALUE>dsd767dsdkXSAre</TRANSACTIONVALUE>
         <APPLICATION>QuoteSync</Application> 
</Log>
#######################  
<?xml version='1.0'?>  
<Log>
         <HOST>127.0.0.1</HOST>
         <DATE>10-04-2016T12:12:12</DATE>
         <TRANSACTIONID>OpportunityId</TRANSACTIONID>
           <TRANSACTIONVALUE>dsd767dsdkXSAre</TRANSACTIONVALUE>
         <APPLICATION>QuoteSync</Application> 
</Log>

Thanks,
Vinay

0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Try this for your sourcetype definition (props.conf on Indexer/Heavy forwarder)

[YourSourceType]
LINE_BREAKER = (#+\s*[\r\n]+)
SHOULD_LINEMERGE = false
TIME_PREFIX=\<DATE\>
TIME_FORMAT = %m-%d-%Y%%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 19

View solution in original post

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try this for your sourcetype definition (props.conf on Indexer/Heavy forwarder)

[YourSourceType]
LINE_BREAKER = (#+\s*[\r\n]+)
SHOULD_LINEMERGE = false
TIME_PREFIX=\<DATE\>
TIME_FORMAT = %m-%d-%Y%%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 19
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...