<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: XML Logfile not breaking correctly in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127444#M7549</link>
    <description>&lt;P&gt;In &lt;STRONG&gt;props.conf&lt;/STRONG&gt; on the indexer (or wherever your data is being parsed), try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetypehere]
BREAK_ONLY_BEFORE = \&amp;lt;reservationresults&amp;gt;
MAX_EVENTS = 1024
TIME_PREFIX = \&amp;lt;end_date&amp;gt;
MAX_TIMESTAMP_LOOKAHEAD = 23
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You might not need &lt;CODE&gt;MAX_EVENTS&lt;/CODE&gt;, but the default maximum lines per event is 256, so I usually set it higher. You might also need to add &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt;, but I think this is enough information so that Splunk will parse your XML log into proper events.&lt;/P&gt;

&lt;P&gt;FYI, you need the &lt;CODE&gt;\&lt;/CODE&gt; because the &lt;CODE&gt;&amp;lt;&lt;/CODE&gt; is a special character in regular expressions.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2014 06:59:52 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2014-01-28T06:59:52Z</dc:date>
    <item>
      <title>XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127443#M7548</link>
      <description>&lt;P&gt;I have the below log entry which is getting split at the end_date stanza. &lt;/P&gt;

&lt;P&gt;I have MAX_TIMESTAMP_LOOKAHEAD=23 set in my props but it is having no impact. I have tried multiple other things but to no avail. Any help much appreciated!&lt;/P&gt;

&lt;P&gt;2014-01-27 16:30:08,411 | TRACE | 1768824013-84717 | ReservationService               | beans.LoggingUtilsBean    223 | DWH Body: &lt;BR /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;
&lt;RESERVATIONRESULTS&gt;&lt;BR /&gt;
   &lt;SYSTEM_ID&gt;PM&lt;/SYSTEM_ID&gt;&lt;BR /&gt;
   &lt;ADVERTISER_ID&gt;redacted&lt;/ADVERTISER_ID&gt;&lt;BR /&gt;
   &lt;PROPERTY_ID&gt;redacted&lt;/PROPERTY_ID&gt;&lt;BR /&gt;
   &lt;UNIT_ID&gt;95193&lt;/UNIT_ID&gt;&lt;BR /&gt;
   &lt;END_DATE&gt;2014-01-27 16:30:08.410&lt;/END_DATE&gt;&lt;BR /&gt;
   &lt;QUOTE&gt;1&lt;/QUOTE&gt;&lt;BR /&gt;
   &lt;CURRENCY&gt;EUR&lt;/CURRENCY&gt;&lt;BR /&gt;
   &lt;AMOUNT&gt;redacted&lt;/AMOUNT&gt;&lt;BR /&gt;
   &lt;STATUS&gt;Success&lt;/STATUS&gt;&lt;BR /&gt;
   &lt;STATUS_MESSAGE&gt;&lt;/STATUS_MESSAGE&gt;&lt;BR /&gt;
   &lt;EMAIL&gt;&lt;/EMAIL&gt;&lt;BR /&gt;
   &lt;SITE&gt;redacted&lt;/SITE&gt;&lt;BR /&gt;
   &lt;LISTING_ID&gt;p2149148&lt;/LISTING_ID&gt;&lt;BR /&gt;
   &lt;TRACKING_UUID&gt;redacted&lt;/TRACKING_UUID&gt;&lt;BR /&gt;
&lt;/RESERVATIONRESULTS&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:44:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127443#M7548</guid>
      <dc:creator>nwales</dc:creator>
      <dc:date>2020-09-28T15:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127444#M7549</link>
      <description>&lt;P&gt;In &lt;STRONG&gt;props.conf&lt;/STRONG&gt; on the indexer (or wherever your data is being parsed), try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetypehere]
BREAK_ONLY_BEFORE = \&amp;lt;reservationresults&amp;gt;
MAX_EVENTS = 1024
TIME_PREFIX = \&amp;lt;end_date&amp;gt;
MAX_TIMESTAMP_LOOKAHEAD = 23
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You might not need &lt;CODE&gt;MAX_EVENTS&lt;/CODE&gt;, but the default maximum lines per event is 256, so I usually set it higher. You might also need to add &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt;, but I think this is enough information so that Splunk will parse your XML log into proper events.&lt;/P&gt;

&lt;P&gt;FYI, you need the &lt;CODE&gt;\&lt;/CODE&gt; because the &lt;CODE&gt;&amp;lt;&lt;/CODE&gt; is a special character in regular expressions.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 06:59:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127444#M7549</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-01-28T06:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127445#M7550</link>
      <description>&lt;P&gt;Isn't MAX_TIMESTAMP_LOOKAHEAD to small to reach the TIME_PREFIX?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:44:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127445#M7550</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2020-09-28T15:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127446#M7551</link>
      <description>&lt;P&gt;nope, MAX_TIMESTAMP_LOOKAHEAD sets a value to tell Splunk how far &lt;B&gt;past the TIME_PREFIX location&lt;/B&gt; it must check in the event for the timestamp.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:44:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127446#M7551</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2020-09-28T15:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127447#M7552</link>
      <description>&lt;P&gt;Apologies, I tried to edit my question unsuccessfully all night due to broken captcha's.&lt;/P&gt;

&lt;P&gt;To clarify, I only want it to break at the very first line, not in the XML so what you see there should be one event.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:12:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127447#M7552</guid>
      <dc:creator>nwales</dc:creator>
      <dc:date>2014-01-28T15:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127448#M7553</link>
      <description>&lt;P&gt;New answer based on comments to my other answer: this solution should work if the entire file should be treated as a single event.&lt;/P&gt;

&lt;P&gt;In &lt;STRONG&gt;props.conf&lt;/STRONG&gt; on the indexer (or wherever your data is being parsed), try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetypehere]
TIME_PREFIX = \&amp;lt;end_date&amp;gt;
MAX_TIMESTAMP_LOOKAHEAD = 23
SHOULD_LINEMERGE = false
LINE_BREAKER = ((*FAIL))
TRUNCATE = 99999999
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I used the info in this answer &lt;A href="http://answers.splunk.com/answers/106075/each-file-as-one-single-splunk-event"&gt;Each File as One Single Splunk Event&lt;/A&gt; for part of this.&lt;BR /&gt;&lt;BR /&gt;
If you want to use the date on the first line as your event date, do this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetypehere]
MAX_TIMESTAMP_LOOKAHEAD = 23
SHOULD_LINEMERGE = false
LINE_BREAKER = ((*FAIL))
TRUNCATE = 99999999
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jan 2014 22:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127448#M7553</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-01-28T22:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127449#M7554</link>
      <description>&lt;P&gt;@MuS: thx for clarifying that, reading the documentation helps sometimes&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 07:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127449#M7554</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2014-01-29T07:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: XML Logfile not breaking correctly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127450#M7555</link>
      <description>&lt;P&gt;I got this sorted out with Nick.  Turns out he needed two things.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; props.conf on the indexers, not the LWF/UF's&lt;/LI&gt;
&lt;LI&gt;props.conf contents of&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;BREAK_ ONLY_BEFORE _DATE = true&lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %Y-%m-%d %H:%M:%S,%3N&lt;/P&gt;

&lt;P&gt;TIME_PREFIX = ^&lt;/P&gt;

&lt;P&gt;(NOTE THE COMMA, NOT A PERIOD in the TIME_FORMAT --the "unwanted" timestamps have periods before the %3N's)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2014 22:45:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Logfile-not-breaking-correctly/m-p/127450#M7555</guid>
      <dc:creator>narwhal</dc:creator>
      <dc:date>2014-02-13T22:45:10Z</dc:date>
    </item>
  </channel>
</rss>

