<?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 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259126#M77678</link>
    <description>&lt;P&gt;This sounds very similar to &lt;A href="https://answers.splunk.com/answers/102528/field-discovery-extraction-works-but-extracted-field-values-are-not-found-in-searches.html"&gt;https://answers.splunk.com/answers/102528/field-discovery-extraction-works-but-extracted-field-values-are-not-found-in-searches.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I wonder if you need a fields.conf on your search head with: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[user]
INDEXED_VALUE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to solve this issue. There might be a more efficient way with adjusting tokenization per the other answer, but perhaps this will work? The unfortunate thing is that this impacts all fields called user not just that in your particular sourcetype (since this is on the building of the search end, no data yet).&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2016 15:22:18 GMT</pubDate>
    <dc:creator>acharlieh</dc:creator>
    <dc:date>2016-07-13T15:22:18Z</dc:date>
    <item>
      <title>Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259113#M77665</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have a field extraction to extract email address from a wso2 log and rename it as user. &lt;/P&gt;

&lt;P&gt;So this log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-07-11 20:38:30,633 priority sampledata-not_real-1111-simple-90 mydata.platform.stuff.yea.morestuff field=handler method=value scopeValue=email_address=myemail@smile.com|something:stuff=me&amp;amp;app=hello_stuff id=""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have set to extract:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;scopeValue=email_address=(?P&amp;lt;user&amp;gt;[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,})
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* user=myemail@smile.com earliest=-48h@h  sourcetype="wso2:am:runtime" "scopeValue=email_address=" | stats  count as "UserCountUsingField"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the above log with the email in the user field&lt;/P&gt;

&lt;P&gt;When I run this search I do not get that log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* user=myemail@smile.com earliest=-48h@h  sourcetype="wso2:am:runtime"  | stats  count as "UserCountUsingField"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea why that wouldn't be working?&lt;BR /&gt;
Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 13:10:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259113#M77665</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T13:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259114#M77666</link>
      <description>&lt;P&gt;NOTE: I had to use brackets instead of the proper &amp;lt;&amp;gt; for the field name in the regex because of formatting in this page&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 13:29:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259114#M77666</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T13:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259115#M77667</link>
      <description>&lt;P&gt;How did you set to extract the email address? Check the permission for the field extraction.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 13:54:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259115#M77667</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-13T13:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259116#M77668</link>
      <description>&lt;P&gt;I don't know if the square brackets is a problem of the post.&lt;BR /&gt;
I tested your regex on &lt;BR /&gt;
&lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;just a little bit modified:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;scopeValue\=email_address\=(?P[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I have the result you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;myemail@smile.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:09:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259116#M77668</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-07-13T14:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259117#M77669</link>
      <description>&lt;P&gt;Permissions are Global: readable by all and writable to admin and power&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259117#M77669</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T14:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259118#M77670</link>
      <description>&lt;P&gt;That regex is a little bit of overkill if all you want is the user. You could try something like this in the sourcetype stanza in &lt;CODE&gt;props.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-email_user = email_address=(?&amp;lt;user&amp;gt;[^|]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Some explanation:&lt;/P&gt;

&lt;P&gt;This regex is looking for the string "email_address=" and then the capture group contains a &lt;A href="http://www.regular-expressions.info/charclass.html"&gt;negated character class&lt;/A&gt; which says "all characters until a pipe".&lt;/P&gt;

&lt;P&gt;HTH,&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:30:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259118#M77670</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2016-07-13T14:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259119#M77671</link>
      <description>&lt;P&gt;I added this and reapplied the configs. Still don't get this record when searching:&lt;BR /&gt;
index=* user=&lt;A href="mailto:myemail@smile.com"&gt;myemail@smile.com&lt;/A&gt; earliest=-48h@h  sourcetype="wso2:am:runtime"  | stats  count as "UserCountUsingField"&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:55:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259119#M77671</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T14:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259120#M77672</link>
      <description>&lt;P&gt;I added this and reapplied the configs. Still don't get this record when searching:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* user=myemail@smile.com earliest=-48h@h  sourcetype="wso2:am:runtime"  | stats  count as "UserCountUsingField"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259120#M77672</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T14:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259121#M77673</link>
      <description>&lt;P&gt;If you search without the stats part, do you see the "user" field in your field list?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:57:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259121#M77673</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2016-07-13T14:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259122#M77674</link>
      <description>&lt;P&gt;try using double quotes.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* user="myemail@smile.com" earliest=-48h@h sourcetype="wso2:am:runtime" | stats count as "UserCountUsingField"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 14:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259122#M77674</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-07-13T14:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259123#M77675</link>
      <description>&lt;P&gt;This record is not returned at all when searching UNLESS you use "scopeValue", this returns the log I am looking for:&lt;BR /&gt;
index=* user=&lt;A href="mailto:myemail@smile.com"&gt;myemail@smile.com&lt;/A&gt; earliest=-48h@h  sourcetype="wso2:am:runtime" "scopeValue"&lt;/P&gt;

&lt;P&gt;This returns nothing:&lt;BR /&gt;
index=*  user=&lt;A href="mailto:myemail@smile.com"&gt;myemail@smile.com&lt;/A&gt; earliest=-48h@h  sourcetype="wso2:am:runtime"&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:16:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259123#M77675</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T15:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259124#M77676</link>
      <description>&lt;P&gt;Unfortunately I get the same results&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:17:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259124#M77676</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T15:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259125#M77677</link>
      <description>&lt;P&gt;right, but in that case specifying a user seems incidental. As I asked before, if you search without the stats part, do you see the "user" field in your field list?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259125#M77677</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2016-07-13T15:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259126#M77678</link>
      <description>&lt;P&gt;This sounds very similar to &lt;A href="https://answers.splunk.com/answers/102528/field-discovery-extraction-works-but-extracted-field-values-are-not-found-in-searches.html"&gt;https://answers.splunk.com/answers/102528/field-discovery-extraction-works-but-extracted-field-values-are-not-found-in-searches.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I wonder if you need a fields.conf on your search head with: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[user]
INDEXED_VALUE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to solve this issue. There might be a more efficient way with adjusting tokenization per the other answer, but perhaps this will work? The unfortunate thing is that this impacts all fields called user not just that in your particular sourcetype (since this is on the building of the search end, no data yet).&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:22:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259126#M77678</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2016-07-13T15:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259127#M77679</link>
      <description>&lt;P&gt;If this log is not returned then there won't be a user field&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:23:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259127#M77679</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T15:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259128#M77680</link>
      <description>&lt;P&gt;What I'm getting at is, does the field extraction work. If you look at events that should have this field extracted, is the field showing up?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259128#M77680</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2016-07-13T15:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259129#M77681</link>
      <description>&lt;P&gt;It appears that the extraction is only partly working. For some addresses it works and others it does not but I have not found WHY as the addresses it works on are the same format that it does not&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:54:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-not-working/m-p/259129#M77681</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2016-07-13T16:54:56Z</dc:date>
    </item>
  </channel>
</rss>

