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
Revered Legend

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
Revered Legend

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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...