<?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: Why do my extractions not work? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387496#M113024</link>
    <description>&lt;P&gt;if you truncates the raw event, maybe the event displayed is not exactly as it in stored.&lt;BR /&gt;
look at your field _raw to see that is the raw event.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2018 16:36:56 GMT</pubDate>
    <dc:creator>yannK</dc:creator>
    <dc:date>2018-06-19T16:36:56Z</dc:date>
    <item>
      <title>Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387488#M113016</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;

&lt;P&gt;I have an event that looks like this (I omitted the sensitive information):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2018-06-07 09:55:16 ERROR ServiceRestCompany:285 - Error 500 in method: getServiceMethod3
Listener refused the connection with the following error:
ORA-55555, TNS:listener could not find available handler with matching protocol stack
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I wrote a regular expression to extract "Service" and "Method3" in the line: &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;in method: get &lt;EM&gt;Service&lt;/EM&gt; &lt;STRONG&gt;Method&lt;/STRONG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Regular expression:&lt;BR /&gt;
&lt;CODE&gt;in method:\sget(?.+?(?=[A-Z]))(?.+?(?=\s))&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Whenever I search for index="..." sourcetype="..." the events show WITH the fields extracted; however if I click on the extracted fields below the event to add to the search add, it refreshed the page and nothing shows up.&lt;/P&gt;

&lt;P&gt;I do have suspicion of why this may be occurring. I have another sourcetype that also uses the field names of method and system in the same index. I intentionally named them the same because I want to be able to search method="blank" and it pull from both of the different source types in the index. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Does not load search"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5207i7F662A1B490C77B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Does not load search" alt="Does not load search" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Any help would be appreciated! &lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 20:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387488#M113016</guid>
      <dc:creator>thomastaylor</dc:creator>
      <dc:date>2018-06-18T20:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387489#M113017</link>
      <description>&lt;P&gt;What else are you specifying in your search (replace sensitive data with #)?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 21:10:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387489#M113017</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-18T21:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387490#M113018</link>
      <description>&lt;P&gt;if you suspect that another extraction is already creating a field named "method",&lt;BR /&gt;
you can test by changing your field to "method2", and see if any of those 2 are extracted.&lt;/P&gt;

&lt;P&gt;try to use a rex command inline to validate your extraction&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mysearch  | rex "in method:\sget(?&amp;lt;service2&amp;gt;[A-Z]\w+)(?&amp;lt;method2&amp;gt;[A-Z]\w+)| table service* method* _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jun 2018 00:00:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387490#M113018</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2018-06-19T00:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387491#M113019</link>
      <description>&lt;P&gt;Splunk is giving some peculiar behavior. It does extract the fields correctly; however, when I add:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=myindex system2=cascade&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;nothing shows up. "No results found". If I remove the &lt;CODE&gt;system2=cascade&lt;/CODE&gt;, it shows me everything and I can verify that the specific sourcetype contains "system2 = Cascade" beneath the event. &lt;/P&gt;

&lt;P&gt;Very odd, I'll be honest.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 12:11:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387491#M113019</guid>
      <dc:creator>thomastaylor</dc:creator>
      <dc:date>2018-06-19T12:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387492#M113020</link>
      <description>&lt;P&gt;I am only specifying the index and sourcetype; however when I add the method to the search, that's when it suddenly doesn't find anything even though I verbatim added it from the event. It's just odd to me why this isn't working.&lt;/P&gt;

&lt;P&gt;I was given instructions from @yannK to try and extract with a different name such as "method2". Unfortunately, this still yields the same result.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 12:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387492#M113020</guid>
      <dc:creator>thomastaylor</dc:creator>
      <dc:date>2018-06-19T12:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387493#M113021</link>
      <description>&lt;P&gt;If I completely get rid of my regular expression, and extract something else from the log and name it "method" it will work. (I used the Splunk regular expression highlight extractor)&lt;/P&gt;

&lt;P&gt;Two options off the top of my head:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Maybe something wrong with the regex that I wrote?&lt;/LI&gt;
&lt;LI&gt;If two of the same sourcetypes have the same field name and field value for the name, Splunk can potentially mess up and only display one sourcetype. &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Any thoughts?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 12:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387493#M113021</guid>
      <dc:creator>thomastaylor</dc:creator>
      <dc:date>2018-06-19T12:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387494#M113022</link>
      <description>&lt;P&gt;@yaank I found the problem but not the solution. I cloned the sourcetype and indexed the data without the transformation I was using. After completing that action, everything works as normal. Do you know why this transformation: &lt;CODE&gt;SEDCMD-truncate-stacktrace = s/\s+at\s[\s\S]+//g&lt;/CODE&gt; would affect this?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 14:26:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387494#M113022</guid>
      <dc:creator>thomastaylor</dc:creator>
      <dc:date>2018-06-19T14:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387495#M113023</link>
      <description>&lt;P&gt;A regex extraction is all or nothing, maybe the regex is wrong.&lt;BR /&gt;
To troubleshoot, start with a regex to extract only 1 of the 2 fields, then work from there.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 16:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387495#M113023</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2018-06-19T16:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387496#M113024</link>
      <description>&lt;P&gt;if you truncates the raw event, maybe the event displayed is not exactly as it in stored.&lt;BR /&gt;
look at your field _raw to see that is the raw event.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 16:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387496#M113024</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2018-06-19T16:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387497#M113025</link>
      <description>&lt;P&gt;As you are extracting the field in the search itself with an inline rex, you cannot use the extracted fields yet to filter....&lt;BR /&gt;
first get your extraction rights, then you can make it an automatic field extraction (instead of in line the search), and you will be able to use it as a base filter for that particular sourcetype.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 16:37:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387497#M113025</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2018-06-19T16:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why do my extractions not work?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387498#M113026</link>
      <description>&lt;P&gt;Thank you to @yannk and @somesoni2 for providing answers to my question. I configured a work around that fits for my needs appropriately.&lt;/P&gt;

&lt;P&gt;Scenario: &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;HTTP Event Logs contain a URI like this: &lt;STRONG&gt;/services/Service/Method&lt;/STRONG&gt; in them&lt;/LI&gt;
&lt;LI&gt;Java Traceback logs contain this in them: &lt;STRONG&gt;getServceMethod&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;They both come from different sourcetypes, but I wanted to unify them to where I could search &lt;CODE&gt;index=main method=(insert method here)&lt;/CODE&gt;. I configured the Regex and added a field named "method" for both sourcetypes. The peculiar part of this scenario is that when I searched for &lt;CODE&gt;index=main method=(whatever here)&lt;/CODE&gt; it would only pull the HTTP event logs; however, if I searched &lt;CODE&gt;index=main method!=(whatever here)&lt;/CODE&gt; it would actually pull both the Java and HTTP event logs that did not contain that method.&lt;/P&gt;

&lt;P&gt;So, after working on this for a few hours, I cut my losses and just added tags to the method fields in both sourcetypes. I can now search &lt;CODE&gt;index=main tag::method=(whatever here)&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;Thank you everyone!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 12:37:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-do-my-extractions-not-work/m-p/387498#M113026</guid>
      <dc:creator>thomastaylor</dc:creator>
      <dc:date>2018-06-22T12:37:25Z</dc:date>
    </item>
  </channel>
</rss>

