<?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 Why is search command TERM not working in one system but does in another? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438820#M124876</link>
    <description>&lt;P&gt;We just found out that the search command TERM does NOT work when used on extracted fields in one of our Splunk Enterprise environments. But it does in another. The 2 systems have some different configurations and handle a different amount of data, but they are both Enterprise and as such, I would expect search commands to work the same way.&lt;/P&gt;

&lt;P&gt;For instance:&lt;BR /&gt;
index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; TERM(group=thruput) TERM(name=thruput)&lt;BR /&gt;
will return nothing in system 1 while it returns the correct events in system 2.&lt;/P&gt;

&lt;P&gt;However using CASE works in both:&lt;BR /&gt;
index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; CASE(group=thruput) CASE(name=thruput)&lt;BR /&gt;
returns the correct events in both system 1 and system 2&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Why does TERM work in system 2 but not in system 1&lt;/LI&gt;
&lt;LI&gt;What method can I use to identify the root cause&lt;/LI&gt;
&lt;LI&gt;Why do we need to use TERM or CASE if the fields are extracted? 
I thought that looking for group=thruput name=thruput would work faster since these are extracted, and therefore indexed, fields.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;The following section shows the 3 main queries I ran over a 24 hours time range and results.&lt;/P&gt;

&lt;P&gt;SYSTEM 1 (AWS)&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; TERM(group=thruput) TERM(name=thruput)&lt;BR /&gt;
0 events&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;idx&lt;/EM&gt; CASE(group=thruput) CASE(name=thruput)&lt;BR /&gt;
found: 354,372 events&lt;BR /&gt;
runtime: 18.818 seconds&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;idx&lt;/EM&gt; group=thruput name=thruput&lt;BR /&gt;
found: 351,096 events&lt;BR /&gt;
runtime:28.892 seconds&lt;/P&gt;

&lt;P&gt;SYSTEM 2 (Data Center)&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; TERM(group=thruput) TERM(name=thruput)&lt;BR /&gt;
found: 86,893 events&lt;BR /&gt;
runtime: 2.183 seconds&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; CASE(group=thruput) CASE(name=thruput)&lt;BR /&gt;
found: 86,893 events&lt;BR /&gt;
runtime: 2.187 seconds&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; group=thruput name=thruput&lt;BR /&gt;
found: 86,397 events&lt;BR /&gt;
runtime: 6.2 seconds&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2019 21:02:29 GMT</pubDate>
    <dc:creator>sansay</dc:creator>
    <dc:date>2019-05-03T21:02:29Z</dc:date>
    <item>
      <title>Why is search command TERM not working in one system but does in another?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438820#M124876</link>
      <description>&lt;P&gt;We just found out that the search command TERM does NOT work when used on extracted fields in one of our Splunk Enterprise environments. But it does in another. The 2 systems have some different configurations and handle a different amount of data, but they are both Enterprise and as such, I would expect search commands to work the same way.&lt;/P&gt;

&lt;P&gt;For instance:&lt;BR /&gt;
index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; TERM(group=thruput) TERM(name=thruput)&lt;BR /&gt;
will return nothing in system 1 while it returns the correct events in system 2.&lt;/P&gt;

&lt;P&gt;However using CASE works in both:&lt;BR /&gt;
index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; CASE(group=thruput) CASE(name=thruput)&lt;BR /&gt;
returns the correct events in both system 1 and system 2&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Why does TERM work in system 2 but not in system 1&lt;/LI&gt;
&lt;LI&gt;What method can I use to identify the root cause&lt;/LI&gt;
&lt;LI&gt;Why do we need to use TERM or CASE if the fields are extracted? 
I thought that looking for group=thruput name=thruput would work faster since these are extracted, and therefore indexed, fields.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;The following section shows the 3 main queries I ran over a 24 hours time range and results.&lt;/P&gt;

&lt;P&gt;SYSTEM 1 (AWS)&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; TERM(group=thruput) TERM(name=thruput)&lt;BR /&gt;
0 events&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;idx&lt;/EM&gt; CASE(group=thruput) CASE(name=thruput)&lt;BR /&gt;
found: 354,372 events&lt;BR /&gt;
runtime: 18.818 seconds&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;idx&lt;/EM&gt; group=thruput name=thruput&lt;BR /&gt;
found: 351,096 events&lt;BR /&gt;
runtime:28.892 seconds&lt;/P&gt;

&lt;P&gt;SYSTEM 2 (Data Center)&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; TERM(group=thruput) TERM(name=thruput)&lt;BR /&gt;
found: 86,893 events&lt;BR /&gt;
runtime: 2.183 seconds&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; CASE(group=thruput) CASE(name=thruput)&lt;BR /&gt;
found: 86,893 events&lt;BR /&gt;
runtime: 2.187 seconds&lt;/P&gt;

&lt;P&gt;earliest=5/2/2019:0:0:0 latest=5/3/2019:0:0:0 index=_internal host=&lt;EM&gt;indexer&lt;/EM&gt; group=thruput name=thruput&lt;BR /&gt;
found: 86,397 events&lt;BR /&gt;
runtime: 6.2 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 21:02:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438820#M124876</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2019-05-03T21:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why is search command TERM not working in one system but does in another?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438821#M124877</link>
      <description>&lt;P&gt;you may need to post the actual event message in System1 and System2 too&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 21:24:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438821#M124877</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-03T21:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is search command TERM not working in one system but does in another?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438822#M124878</link>
      <description>&lt;P&gt;The events are pretty standard logs written by splunkd. So their content shouldn't be a determinant factor whether they are found or not by Splunk.&lt;/P&gt;

&lt;P&gt;Anyway, here is a sample event:&lt;BR /&gt;
"05-02-2019 23:59:56.202 +0000 INFO  Metrics - group=thruput, name=thruput, instantaneous_kbps=1.92954826907947, instantaneous_eps=6.484249982611887, average_kbps=4004.078166704291, total_k_processed=27241737783, kb=59.8125, ev=201, load_average=1.8"&lt;BR /&gt;
Source=/opt/splunk/var/log/splunk/metrics.log&lt;BR /&gt;
sourcetype=splunkd&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438822#M124878</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2020-09-30T00:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is search command TERM not working in one system but does in another?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438823#M124879</link>
      <description>&lt;P&gt;This might be an anonymization error, or is your search that's returning 0 events on "SYSTEM 1 (AWS)" searching for the correct host? &lt;/P&gt;

&lt;P&gt;I note that your TERM search for SYSTEM 1 is using &lt;CODE&gt;host=indexer&lt;/CODE&gt; like the queries from SYSTEM 2, whereas the other queries in SYSTEM 1 are using &lt;CODE&gt;host=idx&lt;/CODE&gt; (Obviously if you're trying to search for logs of a host that Splunk is neither collecting, nor distributing search to, you're going to get back no results)&lt;/P&gt;

&lt;P&gt;The other question I have is are the two systems the exact same versions of Splunk Enterprise (we're not looking for a bug in one version or the other), and the configuration differences are not around segmentation and metrics for these logs? (although I haven't figured out exactly to make CASE work but TERM not yet, other than searching for the wrong host...)&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2019 02:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438823#M124879</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2019-05-05T02:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why is search command TERM not working in one system but does in another?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438824#M124880</link>
      <description>&lt;P&gt;Of course, it has nothing to do with the indexer name. I see that I posted one version of the query in the wrong system, because I just quickly copy pasted, not remembering that they have different indexer names.&lt;BR /&gt;
Segmentation? I have no idea how that would impact the functionality of this command. Please elaborate.&lt;BR /&gt;
Thank you.&lt;/P&gt;

&lt;P&gt;Ahh and yes, both systems use the same version 7.2.4.2&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2019 21:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438824#M124880</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2019-05-05T21:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why is search command TERM not working in one system but does in another?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438825#M124881</link>
      <description>&lt;P&gt;I'd probably start with segmenters.conf to be sure they are the same between systems.  That's the file that defines the rules for major/minor breakers that ultimately create the terms that are indexed with your events.  I think TERM is essentially matching your term filter against the terms found using these breakers.  &lt;/P&gt;

&lt;P&gt;This session might help (more than I will)&lt;BR /&gt;
&lt;A href="https://conf.splunk.com/files/2016/recordings/fields-indexed-tokens-and-you.mp4"&gt;https://conf.splunk.com/files/2016/recordings/fields-indexed-tokens-and-you.mp4&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 15:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-search-command-TERM-not-working-in-one-system-but-does-in/m-p/438825#M124881</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-05-06T15:32:32Z</dc:date>
    </item>
  </channel>
</rss>

