<?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 field extraction from raw data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21623#M3555</link>
    <description>&lt;P&gt;Hi There,&lt;/P&gt;

&lt;P&gt;I have below data that i will like to extract as key-value pair from a custom event source i have created. &lt;/P&gt;

&lt;P&gt;for example i have &lt;/P&gt;

&lt;P&gt;sourcetype=DBData&lt;/P&gt;

&lt;P&gt;and in each result i have below data that i will like to extract. the data is in XML format&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username1 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username2 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username3 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username3 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;I want to call Field Name as UersName and value as per above from the data. &lt;/P&gt;

&lt;P&gt;I have tried the Interactive Field Extractor for this source type and added bunch of values as shown above but when i click on generate it give me below errors. I am not good at all with regex as of now. This sounds very simple task i am not sure why IFX is not able to take care of this.&lt;/P&gt;

&lt;P&gt;Invalid search job/offset specified. [HTTP 404] &lt;A href="https://127.0.0.1:8089/services/search/jobs/1367438277.12976"&gt;https://127.0.0.1:8089/services/search/jobs/1367438277.12976&lt;/A&gt;; [{'text': 'Unknown sid.', 'type': 'FATAL', 'code': None}]. Defaulting to using values from the first result of the search string: ""&lt;BR /&gt;
No regex could be learned. Try providing different examples or restriction.&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2013 20:26:49 GMT</pubDate>
    <dc:creator>jatin_patel</dc:creator>
    <dc:date>2013-05-01T20:26:49Z</dc:date>
    <item>
      <title>field extraction from raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21623#M3555</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;

&lt;P&gt;I have below data that i will like to extract as key-value pair from a custom event source i have created. &lt;/P&gt;

&lt;P&gt;for example i have &lt;/P&gt;

&lt;P&gt;sourcetype=DBData&lt;/P&gt;

&lt;P&gt;and in each result i have below data that i will like to extract. the data is in XML format&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username1 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username2 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username3 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;&amp;lt; Name &amp;gt; username3 &amp;lt; /Name &amp;gt;&lt;/P&gt;

&lt;P&gt;I want to call Field Name as UersName and value as per above from the data. &lt;/P&gt;

&lt;P&gt;I have tried the Interactive Field Extractor for this source type and added bunch of values as shown above but when i click on generate it give me below errors. I am not good at all with regex as of now. This sounds very simple task i am not sure why IFX is not able to take care of this.&lt;/P&gt;

&lt;P&gt;Invalid search job/offset specified. [HTTP 404] &lt;A href="https://127.0.0.1:8089/services/search/jobs/1367438277.12976"&gt;https://127.0.0.1:8089/services/search/jobs/1367438277.12976&lt;/A&gt;; [{'text': 'Unknown sid.', 'type': 'FATAL', 'code': None}]. Defaulting to using values from the first result of the search string: ""&lt;BR /&gt;
No regex could be learned. Try providing different examples or restriction.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2013 20:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21623#M3555</guid>
      <dc:creator>jatin_patel</dc:creator>
      <dc:date>2013-05-01T20:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction from raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21624#M3556</link>
      <description>&lt;P&gt;@jatin_patel,  using the field extractor is the wrong way to go with this data type.  Here you will want to use props.conf file for advanced configuration.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
#props.conf&lt;BR /&gt;
[DBData]&lt;BR /&gt;
KV_MODE = xml #xml : automatically extracts fields from XML data&lt;BR /&gt;
FIELDALIAS-Name = Name AS UserName #Use this to apply aliases to a field. The original field is not removed. This just means that the original field can be searched on using any of its aliases.&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Read through the props.conf for more information. &lt;STRONG&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Admin/Propsconf"&gt;Propsconf&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This should get your started and or help.  Dont forget to vote up and accept anwsers that help.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2013 22:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21624#M3556</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2013-05-01T22:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction from raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21625#M3557</link>
      <description>&lt;P&gt;I tried but that is creating too many unwanted fields like over 5000. I only need few fields from the XML data. Search also becomes pretty slow.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 02:55:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21625#M3557</guid>
      <dc:creator>jatin_patel</dc:creator>
      <dc:date>2013-05-02T02:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction from raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21626#M3558</link>
      <description>&lt;P&gt;How about:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Name&amp;gt;(?&amp;lt;UserName&amp;gt;[^&amp;lt;]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2013 06:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21626#M3558</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-02T06:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction from raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21627#M3559</link>
      <description>&lt;P&gt;sorry for late reply, but it did not work..&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2013 17:50:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21627#M3559</guid>
      <dc:creator>jatin_patel</dc:creator>
      <dc:date>2013-05-07T17:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction from raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21628#M3560</link>
      <description>&lt;P&gt;Is your data formatted exactly as above, with spaces after and before the tags? In that case you need to change the regex accordingly.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2013 19:21:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-from-raw-data/m-p/21628#M3560</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-07T19:21:08Z</dc:date>
    </item>
  </channel>
</rss>

