<?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 extract fields from XML data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223053#M65642</link>
    <description>&lt;P&gt;username as shown in screen shot a123456 b123456 c123456" followed by /username as shown.&lt;/P&gt;

&lt;P&gt;It wont let me post as written.&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2016 11:13:24 GMT</pubDate>
    <dc:creator>smudge797</dc:creator>
    <dc:date>2016-05-03T11:13:24Z</dc:date>
    <item>
      <title>How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223040#M65629</link>
      <description>&lt;P&gt;Splunk is not recognizing the fields.  What is the recommended method to extract these fields, especially &lt;STRONG&gt;username&lt;/STRONG&gt; which can be upper or lower case letters followed by 6 digits:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1287i2D3863945700777A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 22:01:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223040#M65629</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-04-26T22:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223041#M65630</link>
      <description>&lt;P&gt;Can you post the sample again? &lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 23:08:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223041#M65630</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2016-04-26T23:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223042#M65631</link>
      <description>&lt;P&gt;updated.  thanks&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 06:43:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223042#M65631</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-04-27T06:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223043#M65632</link>
      <description>&lt;P&gt;The username field can contain sometimes the first character of the users ID is uppercase, and other times they are lower case.   In other cases, an engineer logs in for remote assistance and two or three sets of IDs where the right most ID is the one we want. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 06:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223043#M65632</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-04-27T06:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223044#M65633</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You can use the rex command to try that the extraction is correct, and then add to props.conf &lt;/P&gt;

&lt;P&gt;Use this command in search to create the field user&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex "\&amp;lt;username\&amp;gt;(?&amp;lt;user&amp;gt;[^\&amp;lt;]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope i help you&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 09:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223044#M65633</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-04-27T09:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223045#M65634</link>
      <description>&lt;P&gt;Thanks.  So in a distributed environment where would that sit?  Forwarder IDX or SH?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 09:29:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223045#M65634</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-04-27T09:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223046#M65635</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Only in the SH&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 09:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223046#M65635</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-04-27T09:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223047#M65636</link>
      <description>&lt;P&gt;Thanks but it does not look like a valid stanza for props.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 09:52:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223047#M65636</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-04-27T09:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223048#M65637</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In props.conf you have to use this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-user = \&amp;lt;username\&amp;gt;(?&amp;lt;user&amp;gt;[^\&amp;lt;]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Apr 2016 09:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223048#M65637</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-04-27T09:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223049#M65638</link>
      <description>&lt;P&gt;great thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 10:53:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223049#M65638</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-04-27T10:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223050#M65639</link>
      <description>&lt;P&gt;Can you try this? &lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
&lt;CODE&gt;[your_sourcetype]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;TIME_FORMAT=%b %d %Y %H:%M&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;TIME_PREFIX=&amp;lt;stamp&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;SHOULD_LINEMERGE=false&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;BREAK_ONLY_BEFORE=\&amp;lt;CloneInfo\&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;MUST_BREAK_AFTER=\&amp;lt;\/CloneInfo\&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;LINE_BREAKER=(&amp;lt;/CloneInfo&amp;gt;)&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;REPORT-xmlfields=xmlfields&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
&lt;CODE&gt;[xmlfields]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;REGEX = &amp;lt;([^\&amp;gt;]*)&amp;gt;([^\&amp;lt;]*)&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;FORMAT = $1::$2&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will extract every field like this:&lt;BR /&gt;
&lt;CODE&gt;&amp;lt;field_name&amp;gt;value&amp;lt;/field_name&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;its also extracting the _timestamp from the field you already have in you data. Does you XML have multiple  tags? With this configs every  becomes a separate event making the data more readable.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 12:07:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223050#M65639</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2016-04-27T12:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223051#M65640</link>
      <description>&lt;P&gt;Thats great thanks.  We have one issue that the username can be a multi value entry.  This is because support may be remotely logged onto same host so could have 1 2 or 3 entries of username.  The one we are interested in is the last value so could be:&lt;BR /&gt;
username= a123456 b123456 &lt;STRONG&gt;c123456&lt;/STRONG&gt; &lt;BR /&gt;
username=  b123456 &lt;STRONG&gt;c123456&lt;/STRONG&gt; &lt;BR /&gt;
username=  &lt;STRONG&gt;c123456&lt;/STRONG&gt; &lt;BR /&gt;
Any way of exluding the others and ensuring the last one is always picked up in query?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2016 21:58:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223051#M65640</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-04-29T21:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223052#M65641</link>
      <description>&lt;P&gt;can you post an example?&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 13:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223052#M65641</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2016-05-02T13:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to extract fields from XML data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223053#M65642</link>
      <description>&lt;P&gt;username as shown in screen shot a123456 b123456 c123456" followed by /username as shown.&lt;/P&gt;

&lt;P&gt;It wont let me post as written.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 11:13:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-configure-Splunk-to-extract-fields-from-XML-data/m-p/223053#M65642</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2016-05-03T11:13:24Z</dc:date>
    </item>
  </channel>
</rss>

