<?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: EXTRACT from specific field (using 'in' syntax) doesn't work without forcing an extract reload=T in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/EXTRACT-from-specific-field-using-in-syntax-doesn-t-work-without/m-p/61519#M12261</link>
    <description>&lt;P&gt;Exactly correct! &lt;/P&gt;

&lt;P&gt;Using btool, I was able to see the order that the extractions are applied, and confirmed what you said.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-extractDomain = (?&amp;lt;domain&amp;gt;(?:(?:(?:[^\.]+\.)?(?&amp;lt;tld&amp;gt;(?:[^\.\s]{2})(?:(?:\.[^\.\s][^\.\s])|(?:[^\.\s]+)))))).$ in questionname
EXTRACT-opcode = (?&amp;lt;operation&amp;gt;[ R]) (?&amp;lt;opcode&amp;gt;.) \[(?&amp;lt;hexflags&amp;gt;[0-9A-Fa-f]+) (?&amp;lt;flags&amp;gt;....) (?&amp;lt;response&amp;gt;[^\]]+)\]
EXTRACT-protocol = (?&amp;lt;packetid&amp;gt;[0-9A-Fa-f]*) (?&amp;lt;protocol&amp;gt;UDP|TCP) (?&amp;lt;direction&amp;gt;\w+) (?&amp;lt;src_ip&amp;gt;[0-9A-Fa-f\.\:]+)\s+
EXTRACT-question1 = \] (?&amp;lt;questiontype&amp;gt;\w+)\s+(?&amp;lt;questionname&amp;gt;.*)
EXTRACT-question2 = \] (?&amp;lt;questionname&amp;gt;[^\s]*)$
EXTRACT-threadid = (?&amp;lt;threadid&amp;gt;[0-9A-Fa-f]+)\s+(?&amp;lt;context&amp;gt;PACKET)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I renamed to zzExtractDomain, it works great because the questionname has been filled at that point&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2013 19:22:02 GMT</pubDate>
    <dc:creator>Adam_Sealey</dc:creator>
    <dc:date>2013-03-14T19:22:02Z</dc:date>
    <item>
      <title>EXTRACT from specific field (using 'in' syntax) doesn't work without forcing an extract reload=T</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/EXTRACT-from-specific-field-using-in-syntax-doesn-t-work-without/m-p/61517#M12259</link>
      <description>&lt;P&gt;I've been trying to do a search time field extraction, using the EXTRACT-&lt;FOO&gt; stanza in props.conf.  &lt;/FOO&gt;&lt;/P&gt;

&lt;P&gt;From the props.conf docs (&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Admin/Propsconf&lt;/A&gt;), it appears that there are 2 ways to perform a search time extraction using EXTRACT; either on the _raw field, or on a specific field.&lt;/P&gt;

&lt;P&gt;When I try to perform the field extraction on a specific field (using the 'in' syntax), the extraction doesn't run unless I specify '| extract reload=T'&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-extractDomain = (?&amp;lt;domain&amp;gt;(?:(?:(?:[^\.]+\.)?(?&amp;lt;tld&amp;gt;(?:[^\.\s]{2})(?:(?:\.[^\.\s][^\.\s])|(?:[^\.\s]+)))))).$ in questionname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I remove the 'in questionname' portion of the extraction (resulting in the extraction being run on _raw), the extraction runs all the time (doesn't require '| extract reload=T')&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-extractDomain = (?&amp;lt;domain&amp;gt;(?:(?:(?:[^\.]+\.)?(?&amp;lt;tld&amp;gt;(?:[^\.\s]{2})(?:(?:\.[^\.\s][^\.\s])|(?:[^\.\s]+)))))).$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Has anyone else run into this problem?  In this case, I can rewrite my extraction to work on _raw, but there are other cases that I'm also working with that it would be very convenient to have the regex be applied to only one field.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 15:48:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/EXTRACT-from-specific-field-using-in-syntax-doesn-t-work-without/m-p/61517#M12259</guid>
      <dc:creator>Adam_Sealey</dc:creator>
      <dc:date>2013-03-14T15:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: EXTRACT from specific field (using 'in' syntax) doesn't work without forcing an extract reload=T</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/EXTRACT-from-specific-field-using-in-syntax-doesn-t-work-without/m-p/61518#M12260</link>
      <description>&lt;P&gt;The problem is most likely that your first extraction runs before the questionname field has been extracted, so there's nothing to extract from. When you run "&lt;CODE&gt;| extract reload=T&lt;/CODE&gt;" separately that happens after all automatic extractions have already been applied so the questionname field exists in that case.&lt;/P&gt;

&lt;P&gt;Extractions are done in alphabetical order, it might be per-sourcetype or globally, I forget which. Anyway EXTRACT-a will run before EXTRACT-b so if you have, for instance, EXTRACT-extractDomain and EXTRACT-questionname that will lead to the problems you're seeing.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 19:10:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/EXTRACT-from-specific-field-using-in-syntax-doesn-t-work-without/m-p/61518#M12260</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-03-14T19:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: EXTRACT from specific field (using 'in' syntax) doesn't work without forcing an extract reload=T</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/EXTRACT-from-specific-field-using-in-syntax-doesn-t-work-without/m-p/61519#M12261</link>
      <description>&lt;P&gt;Exactly correct! &lt;/P&gt;

&lt;P&gt;Using btool, I was able to see the order that the extractions are applied, and confirmed what you said.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-extractDomain = (?&amp;lt;domain&amp;gt;(?:(?:(?:[^\.]+\.)?(?&amp;lt;tld&amp;gt;(?:[^\.\s]{2})(?:(?:\.[^\.\s][^\.\s])|(?:[^\.\s]+)))))).$ in questionname
EXTRACT-opcode = (?&amp;lt;operation&amp;gt;[ R]) (?&amp;lt;opcode&amp;gt;.) \[(?&amp;lt;hexflags&amp;gt;[0-9A-Fa-f]+) (?&amp;lt;flags&amp;gt;....) (?&amp;lt;response&amp;gt;[^\]]+)\]
EXTRACT-protocol = (?&amp;lt;packetid&amp;gt;[0-9A-Fa-f]*) (?&amp;lt;protocol&amp;gt;UDP|TCP) (?&amp;lt;direction&amp;gt;\w+) (?&amp;lt;src_ip&amp;gt;[0-9A-Fa-f\.\:]+)\s+
EXTRACT-question1 = \] (?&amp;lt;questiontype&amp;gt;\w+)\s+(?&amp;lt;questionname&amp;gt;.*)
EXTRACT-question2 = \] (?&amp;lt;questionname&amp;gt;[^\s]*)$
EXTRACT-threadid = (?&amp;lt;threadid&amp;gt;[0-9A-Fa-f]+)\s+(?&amp;lt;context&amp;gt;PACKET)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I renamed to zzExtractDomain, it works great because the questionname has been filled at that point&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 19:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/EXTRACT-from-specific-field-using-in-syntax-doesn-t-work-without/m-p/61519#M12261</guid>
      <dc:creator>Adam_Sealey</dc:creator>
      <dc:date>2013-03-14T19:22:02Z</dc:date>
    </item>
  </channel>
</rss>

