<?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: Field extraction not working on distributed search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33924#M7253</link>
    <description>&lt;P&gt;Missed the transactiontype extract, although that field was also not being extracted (I renamed the field halfway though this thinking transactiontype may be reserved).  I have updated as follows based on Ayn's comments:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = ^'([^']*)' request received
FORMAT = requesttype::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The field is still not being extracted with the above search.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2013 15:44:25 GMT</pubDate>
    <dc:creator>bdstark</dc:creator>
    <dc:date>2013-08-14T15:44:25Z</dc:date>
    <item>
      <title>Field extraction not working on distributed search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33921#M7250</link>
      <description>&lt;P&gt;I am trying to create a field extraction using the manger to extract the equivalent of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=jsonLogs | rex field=message "^'(?&amp;lt;s&amp;gt;[^']*)' request received"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which extracts requesttype properly (as s - Markdown is removing anything between &amp;lt;&amp;gt; with more than one character).  Manager creates the following (ignoring the naming difference between transactiontype and requesttype):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf:
[jsonLogs]
REPORT-requesttype = requesttype

transforms.conf:
[requesttype]
CLEAN_KEYS = 1
MV_ADD = 0
REGEX = ^'(?&amp;lt;transactiontype&amp;gt;[^']*)' request received
SOURCE_KEY = message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;however the requesttype field is never extracted and does not show up in the available fields dialog with the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=jsonLogs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Including the field in the search does not return any results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=jsonLogs requesttype=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The files are in the search app on the search server, and do not exist on the indexer, which looks to be correct from the documentation at &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Deploy/Whatisdistributedsearch"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Deploy/Whatisdistributedsearch&lt;/A&gt;.  The field extraction only occurs on a limited number of results (~65 of 22,000) in the initial search.  I can't figure out what I am doing wrong here after working on this for several hours.  Is there anything I should be looking at?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 05:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33921#M7250</guid>
      <dc:creator>bdstark</dc:creator>
      <dc:date>2013-08-14T05:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working on distributed search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33922#M7251</link>
      <description>&lt;P&gt;In your configuration &lt;CODE&gt;requesttype&lt;/CODE&gt; is not the name of a field. It is the name of a transform stanza to be applied to data with the jsonLogs sourcetype. The name of the field is what you specify between the angle brackets in your regex statement (in your case that is &lt;CODE&gt;transactiontype&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;As you have correctly noted, this configuration should be placed on the Search Head.&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 06:54:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33922#M7251</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-14T06:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working on distributed search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33923#M7252</link>
      <description>&lt;P&gt;Moreover, the &lt;CODE&gt;(?&amp;lt;fieldname&amp;gt;...)&lt;/CODE&gt; format is only for EXTRACT statements, not extractions in transforms.conf. In transforms.conf, you create your matching group without giving it a name - this is done separately in the FORMAT definition. Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = ^'([^']*)' request received
FORMAT = transactiontype::$1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Aug 2013 07:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33923#M7252</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-14T07:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working on distributed search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33924#M7253</link>
      <description>&lt;P&gt;Missed the transactiontype extract, although that field was also not being extracted (I renamed the field halfway though this thinking transactiontype may be reserved).  I have updated as follows based on Ayn's comments:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = ^'([^']*)' request received
FORMAT = requesttype::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The field is still not being extracted with the above search.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 15:44:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33924#M7253</guid>
      <dc:creator>bdstark</dc:creator>
      <dc:date>2013-08-14T15:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working on distributed search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33925#M7254</link>
      <description>&lt;P&gt;I have updated the transforms.prop file, based on Ayn's comments below to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[requesttype]
CLEAN_KEYS = 1
MV_ADD = 0
REGEX = ^'([^']*)' request received
SOURCE_KEY = message
FORMAT = requesttype::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The field still is not being extracted.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 15:46:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working-on-distributed-search/m-p/33925#M7254</guid>
      <dc:creator>bdstark</dc:creator>
      <dc:date>2013-08-14T15:46:08Z</dc:date>
    </item>
  </channel>
</rss>

