<?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: How to filter index from inputlook and avoid 10k subsearch limit? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-index-from-inputlook-and-avoid-10k-subsearch-limit/m-p/609226#M211842</link>
    <description>&lt;P&gt;My first instinct is to cheat around the problem rather than trying to conquer it. &amp;nbsp;In the dashboard, run a hidden search to set a token as $customer_list_tok$, then use this to limit your search. E.g.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search&amp;gt;
  &amp;lt;query&amp;gt;
    | inputlookup CSS_Customers where Region = $inputregion$
    | stats values(Customer) as indices
  &amp;lt;/query&amp;gt;
  &amp;lt;progress&amp;gt;
    &amp;lt;eval token="customer_list_tok"&amp;gt;mvjoin(indices, ",")&amp;lt;/eval&amp;gt;
  &amp;lt;/progress&amp;gt;
&amp;lt;/search&amp;gt;
&amp;lt;input type="dropdown" token="inputregion"&amp;gt;
  &amp;lt;label&amp;gt;Select region&amp;lt;/label&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;US1&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;US2&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;AU1&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;AU2&amp;lt;/choice&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;row&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;
        index IN ($customer_list_tok$) blah
      &amp;lt;/query&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If $inputregion$ token doesn't have to take the values of "US1", "US2", you can even run the same search to populate the token dynamically without the intermediary $customer_list_tok$. &amp;nbsp;E.g.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input type="dropdown" token="inputregion"&amp;gt;
  &amp;lt;label&amp;gt;Select region&amp;lt;/label&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;Region&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;indices&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;
      | inputlookup CSS_Customers
      | stats values(Customer) as indices by Region
      |eval indices = mvjoin(indices, ",")
  &amp;lt;/progress&amp;gt;
&amp;lt;/search&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;row&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;
        index IN ($inputregion$) blah
      &amp;lt;/query&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2022 01:46:20 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-08-12T01:46:20Z</dc:date>
    <item>
      <title>How to filter index from inputlook and avoid 10k subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-index-from-inputlook-and-avoid-10k-subsearch-limit/m-p/609198#M211832</link>
      <description>&lt;P&gt;Creating a dashboard that allows you to select a region which will then retrieve data for only customers in that region. Each customer has their own "index" and the index name is the customer name. I'd like to avoid a subsearch as it's limited to 10k rows, you can subsearch the lookup though. The region isn't included in the customer index data.&lt;/P&gt;
&lt;P&gt;------------------------------&lt;/P&gt;
&lt;P&gt;Lookup data set:&lt;/P&gt;
&lt;P&gt;Region&amp;nbsp; |&amp;nbsp; &amp;nbsp;Customer&lt;/P&gt;
&lt;P&gt;US1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mcdonalds&lt;/P&gt;
&lt;P&gt;US2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Macys&lt;/P&gt;
&lt;P&gt;AU1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Atlassian&lt;/P&gt;
&lt;P&gt;AU2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Outback&lt;/P&gt;
&lt;P&gt;------------------------------&lt;/P&gt;
&lt;P&gt;The issue I have run into is when I retrieve the list of customer names from the lookup, the subsearch is limited to 10k rows, there are a ton more rows that need to be included. I created a very inefficient query which I'm unhappy about, hence why I'm here:&lt;/P&gt;
&lt;P&gt;index="*"&amp;nbsp;&lt;BR /&gt;[inputlookup CSS_Customers where Region = $inputregion$&lt;BR /&gt;| fields Customer&lt;BR /&gt;| rename Customer as index]&lt;BR /&gt;&lt;BR /&gt;Note: I tried tstats to pull a single field, but ran into an index issue. It could be because our "index" field isn't indexed.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 17:50:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-index-from-inputlook-and-avoid-10k-subsearch-limit/m-p/609198#M211832</guid>
      <dc:creator>mtruji</dc:creator>
      <dc:date>2022-08-11T17:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter index from inputlook and avoid 10k subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-index-from-inputlook-and-avoid-10k-subsearch-limit/m-p/609226#M211842</link>
      <description>&lt;P&gt;My first instinct is to cheat around the problem rather than trying to conquer it. &amp;nbsp;In the dashboard, run a hidden search to set a token as $customer_list_tok$, then use this to limit your search. E.g.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search&amp;gt;
  &amp;lt;query&amp;gt;
    | inputlookup CSS_Customers where Region = $inputregion$
    | stats values(Customer) as indices
  &amp;lt;/query&amp;gt;
  &amp;lt;progress&amp;gt;
    &amp;lt;eval token="customer_list_tok"&amp;gt;mvjoin(indices, ",")&amp;lt;/eval&amp;gt;
  &amp;lt;/progress&amp;gt;
&amp;lt;/search&amp;gt;
&amp;lt;input type="dropdown" token="inputregion"&amp;gt;
  &amp;lt;label&amp;gt;Select region&amp;lt;/label&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;US1&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;US2&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;AU1&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="US1"&amp;gt;AU2&amp;lt;/choice&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;row&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;
        index IN ($customer_list_tok$) blah
      &amp;lt;/query&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If $inputregion$ token doesn't have to take the values of "US1", "US2", you can even run the same search to populate the token dynamically without the intermediary $customer_list_tok$. &amp;nbsp;E.g.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input type="dropdown" token="inputregion"&amp;gt;
  &amp;lt;label&amp;gt;Select region&amp;lt;/label&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;Region&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;indices&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;
      | inputlookup CSS_Customers
      | stats values(Customer) as indices by Region
      |eval indices = mvjoin(indices, ",")
  &amp;lt;/progress&amp;gt;
&amp;lt;/search&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;row&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;
        index IN ($inputregion$) blah
      &amp;lt;/query&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 01:46:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-index-from-inputlook-and-avoid-10k-subsearch-limit/m-p/609226#M211842</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-12T01:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter index from inputlook and avoid 10k subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-index-from-inputlook-and-avoid-10k-subsearch-limit/m-p/609517#M211935</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;for the idea. I think your idea could work. A colleague suggested the below query which worked and I went with it for now:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index="*"
    [ inputlookup CSS_Customers where Region = $inputregion$ 
    | fields Customer 
    | rename Customer as index] by index, cfc, _time span=$span$
| timechart span=$span$ limit=0 sum(count) by index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 17:08:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-index-from-inputlook-and-avoid-10k-subsearch-limit/m-p/609517#M211935</guid>
      <dc:creator>mtruji</dc:creator>
      <dc:date>2022-08-15T17:08:26Z</dc:date>
    </item>
  </channel>
</rss>

