<?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: How to configure Splunk to parse and extract fields from my pseudo-XML sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230877#M68479</link>
    <description>&lt;P&gt;At the risk of duplicating what you've already tried, try these props.conf settings.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE=false
LINE_BREAKER=(&amp;gt;&amp;lt;)
TIME_PREFIX=Client created=
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Nov 2015 16:57:20 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2015-11-10T16:57:20Z</dc:date>
    <item>
      <title>How to configure Splunk to parse and extract fields from my pseudo-XML sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230874#M68476</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I have a question regarding the input extraction of XML fields (with inputs and transforms). &lt;BR /&gt;
I have tried to follow the advice in this post: &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/683/xml-input-line-breaking-and-field-extraction-how.html"&gt;https://answers.splunk.com/answers/683/xml-input-line-breaking-and-field-extraction-how.html&lt;/A&gt; &lt;BR /&gt;
but have not been successful yet, since the XML-structure of my data is somehow different.&lt;/P&gt;

&lt;P&gt;Here's the data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;ClientStatistics refDate="2015-11-10T09:47:46.888+01:00"&amp;gt;&amp;lt;RequestStatistics&amp;gt;&amp;lt;Client created="2015-09-10T23:25:17.523+02:00" id="IDxxxx" lastPoll="2015-11-10T09:47:45.279+01:00" pollCount="3342838" pollThroughput="1563"/&amp;gt;&amp;lt;Client created="2015-09-10T23:25:21.751+02:00" id="IDxxxx" lastPoll="2015-11-10T09:46:02.196+01:00" pollCount="45031" pollThroughput="116030"/&amp;gt;&amp;lt;Client created="2015-09-10T23:25:30.007+02:00" id="IDxxxx" lastPoll="2015-11-10T09:47:46.850+01:00" pollCount="16640185" pollThroughput="314"/&amp;gt;&amp;lt;Client created="2015-09-10T23:25:17.516+02:00" id="IDxxxx" lastPoll="2015-11-10T09:47:46.432+01:00" lastPush="2015-11-10T09:47:46.360+01:00" pollCount="40604184" pollThroughput="129" pushCount="11646891" pushThroughput="449"/&amp;gt;&amp;lt;Client created="2015-09-17T11:13:03.268+02:00" id="IDxxxx" lastPoll="2015-09-17T11:29:03.415+02:00" pollCount="9" pollThroughput="120018"/&amp;gt;&amp;lt;Client created="2015-09-17T11:16:03.552+02:00" id="IDxxxx" lastPoll="2015-11-09T08:02:02.497+01:00" pollCount="300" pollThroughput="15237597"/&amp;gt;&amp;lt;/RequestStatistics&amp;gt;&amp;lt;/ClientStatistics&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Yes, it's pretty unstructured, and it's not clean XML...&lt;/P&gt;

&lt;P&gt;I have tried to put &lt;CODE&gt;KV-MODE = xml&lt;/CODE&gt; in my inputs.conf, with no effect. Also, the other suggested setting, like &lt;CODE&gt;BREAK_ONLY_BEFORE&lt;/CODE&gt; or &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; did not split my events.&lt;/P&gt;

&lt;P&gt;I understand, that there should be the possibility to extract the KV-pairs inside the &amp;lt;Client&amp;gt; Tags somehow, maybe with an additional transform command. I figured it sould be &lt;CODE&gt;REGEX = (\w+)="([^"]+)"&lt;/CODE&gt; and &lt;CODE&gt;FORMAT = $1::$2&lt;/CODE&gt; inside transforms.conf - but I am missing the connection.&lt;/P&gt;

&lt;P&gt;Can somebody please enlight me?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 09:15:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230874#M68476</guid>
      <dc:creator>DMohn</dc:creator>
      <dc:date>2015-11-10T09:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and extract fields from my pseudo-XML sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230875#M68477</link>
      <description>&lt;P&gt;What values of &lt;CODE&gt;BREAK_ONLY_BEFORE&lt;/CODE&gt; and &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; have you tried?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 15:06:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230875#M68477</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-10T15:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and extract fields from my pseudo-XML sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230876#M68478</link>
      <description>&lt;P&gt;I have tried numerous versions of RegExes, started with a simple '&amp;lt;', '&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 15:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230876#M68478</guid>
      <dc:creator>DMohn</dc:creator>
      <dc:date>2015-11-10T15:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and extract fields from my pseudo-XML sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230877#M68479</link>
      <description>&lt;P&gt;At the risk of duplicating what you've already tried, try these props.conf settings.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE=false
LINE_BREAKER=(&amp;gt;&amp;lt;)
TIME_PREFIX=Client created=
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Nov 2015 16:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230877#M68479</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-10T16:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and extract fields from my pseudo-XML sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230878#M68480</link>
      <description>&lt;P&gt;Thanks a ton - this was a setting I actually didn't try yet &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;With one small modification (stripping the closing slash as well) it works perfectly!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; SHOULD_LINEMERGE=false
 LINE_BREAKER=(/&amp;gt;&amp;lt;)
 TIME_PREFIX=refDate=
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Nov 2015 08:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-parse-and-extract-fields-from-my/m-p/230878#M68480</guid>
      <dc:creator>DMohn</dc:creator>
      <dc:date>2015-11-11T08:07:50Z</dc:date>
    </item>
  </channel>
</rss>

