<?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: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467999#M131767</link>
    <description>&lt;P&gt;Hi Jacobevans/Kamlesh,&lt;/P&gt;

&lt;P&gt;Thanks for your quick response, still we don't have any data after executing both the searches. Please find below.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://ibb.co/W5dtjr7" alt="https://ibb.co/W5dtjr7" /&gt;&lt;BR /&gt;
&lt;IMG src="https://ibb.co/mFkZ8v1" alt="https://ibb.co/mFkZ8v1" /&gt; &lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2019 15:00:40 GMT</pubDate>
    <dc:creator>bapun18</dc:creator>
    <dc:date>2019-09-04T15:00:40Z</dc:date>
    <item>
      <title>I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467992#M131760</link>
      <description>&lt;P&gt;I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine&lt;/P&gt;

&lt;P&gt;I wrote a query to get the result but it's simple and it's giving static output I want dynamically use index field and count field.&lt;/P&gt;

&lt;P&gt;Following are the query I used.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup idx_myvdf.csv | table index | stats count by index | where count &amp;lt; 1000



|tstats c by index where index[|inputlookup idx_myvdf.csv | rename index AS actual_index] AS actual_count | table index count actual_index]
where count &amp;lt; actual_count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to modify the query so that it will give the output with actual index count mentioned over inputlookup and alert will be triggered once actual count will be greater than count value provided under count field.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7606iE6A2F11D71AEDEE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 12:31:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467992#M131760</guid>
      <dc:creator>bapun18</dc:creator>
      <dc:date>2019-09-04T12:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467993#M131761</link>
      <description>&lt;P&gt;@bapun18 &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats c  as count by index 
| append 
    [| inputlookup idx_myvdf.csv 
    | table index actual_count] 
| stats values(count) as count values(actual_count) as actual_count by index] 
| where count &amp;gt; actual_count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have designed rough search. So just execute and provide your feedback.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:11:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467993#M131761</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-09-04T13:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467994#M131762</link>
      <description>&lt;P&gt;Small correction to these lines (otherwise this looks good to me also).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values(count) as count values(actual_count) as actual_count by index] 
| where count &amp;gt; actual_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:32:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467994#M131762</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-09-04T13:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467995#M131763</link>
      <description>&lt;P&gt;Do it like this (assuming the name of field in the lookup which has the count is &lt;CODE&gt;countFieldInLookup&lt;/CODE&gt;, update per your case)&lt;BR /&gt;
&lt;STRONG&gt;Updated per other question post&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count as actual_count where [|inputlookup idx_myvdf.csv | table index ] by index 
| lookup  idx_myvdf.csv index OUTPUT count as threshold_count
 | where actual_count &amp;gt; threshold_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:58:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467995#M131763</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-09-04T13:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467996#M131764</link>
      <description>&lt;P&gt;&lt;IMG src="http://++%5B1%5D:+/storage/temp/274645-img-20190904-wa0009.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;We are getting following error&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:03:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467996#M131764</guid>
      <dc:creator>bapun18</dc:creator>
      <dc:date>2019-09-04T14:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467997#M131765</link>
      <description>&lt;P&gt;See my comment above. You can only have statistical aggregation function commands between &lt;CODE&gt;stats&lt;/CODE&gt; and &lt;CODE&gt;by&lt;/CODE&gt; - the &lt;CODE&gt;index&lt;/CODE&gt; argument in @kamlesh_vaghela's comment is invalid.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467997#M131765</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-09-04T14:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467998#M131766</link>
      <description>&lt;P&gt;Hi Jacobevans/Kamlesh,&lt;/P&gt;

&lt;P&gt;Thanks for your quick response, still we don't have any data after executing both the searches. Please find below.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://ibb.co/W5dtjr7"&gt;https://ibb.co/W5dtjr7&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://ibb.co/mFkZ8v1"&gt;https://ibb.co/mFkZ8v1&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:59:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467998#M131766</guid>
      <dc:creator>bapun18</dc:creator>
      <dc:date>2019-09-04T14:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467999#M131767</link>
      <description>&lt;P&gt;Hi Jacobevans/Kamlesh,&lt;/P&gt;

&lt;P&gt;Thanks for your quick response, still we don't have any data after executing both the searches. Please find below.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://ibb.co/W5dtjr7" alt="https://ibb.co/W5dtjr7" /&gt;&lt;BR /&gt;
&lt;IMG src="https://ibb.co/mFkZ8v1" alt="https://ibb.co/mFkZ8v1" /&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 15:00:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/467999#M131767</guid>
      <dc:creator>bapun18</dc:creator>
      <dc:date>2019-09-04T15:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: I have a inputlookup which have fields like index and count need to create an alert which should trigger when count of indexes given will be exceed given count in lookup, use of sub search will also fine</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/468000#M131768</link>
      <description>&lt;P&gt;@bapun18&lt;/P&gt;

&lt;P&gt;Can you please execute this search?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats c  as count by index 
 | append 
     [| inputlookup idx_myvdf.csv 
     | table index actual_count] 
 | stats values(count) as count values(actual_count) as actual_count by index] 
 | where count &amp;gt; actual_count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As per your image( &lt;A href="https://ibb.co/mFkZ8v1"&gt;https://ibb.co/mFkZ8v1&lt;/A&gt;), &lt;CODE&gt;actual_count&lt;/CODE&gt; field is not coming. Can you please confirm the values available in &lt;CODE&gt;index&lt;/CODE&gt; OR &lt;CODE&gt;actual_count&lt;/CODE&gt;against the indexes from &lt;CODE&gt;tstats&lt;/CODE&gt; search? &lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 04:54:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-inputlookup-which-have-fields-like-index-and-count-need/m-p/468000#M131768</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-09-05T04:54:12Z</dc:date>
    </item>
  </channel>
</rss>

