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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...