<?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 splunk query with specific product id count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17861#M2522</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My log contains below entries:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;activated=true productid=8432 userid=123 email=abc@abc.com
activated=false productid=8432 userid=2123 email=12@a212bc.com
activated=true productid=3422 userid=434123 email=pqe@dfd.com
activated=true productid=433232 userid=7468 email=434@a43433c.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to find the count for all those users who have activated=true and whose productids are not 645,423,433232,7483,57893,45673,847832,48832,4323,432,3323,323,12,233,234545,2323&lt;/P&gt;

&lt;P&gt;Can any one provide me the query for the same?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2012 21:45:32 GMT</pubDate>
    <dc:creator>freephoneid</dc:creator>
    <dc:date>2012-04-03T21:45:32Z</dc:date>
    <item>
      <title>splunk query with specific product id count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17861#M2522</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My log contains below entries:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;activated=true productid=8432 userid=123 email=abc@abc.com
activated=false productid=8432 userid=2123 email=12@a212bc.com
activated=true productid=3422 userid=434123 email=pqe@dfd.com
activated=true productid=433232 userid=7468 email=434@a43433c.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to find the count for all those users who have activated=true and whose productids are not 645,423,433232,7483,57893,45673,847832,48832,4323,432,3323,323,12,233,234545,2323&lt;/P&gt;

&lt;P&gt;Can any one provide me the query for the same?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 21:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17861#M2522</guid>
      <dc:creator>freephoneid</dc:creator>
      <dc:date>2012-04-03T21:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with specific product id count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17862#M2523</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;activated=true NOT productid=645 NOT productid=423 NOT productid=433232 NOT productid=7483 ... | stats count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Apr 2012 22:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17862#M2523</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-04-03T22:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with specific product id count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17863#M2524</link>
      <description>&lt;P&gt;Hi gkanapathy....The product id list is more than 30...Is there another way to implement this query?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2012 00:02:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17863#M2524</guid>
      <dc:creator>freephoneid</dc:creator>
      <dc:date>2012-04-04T00:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with specific product id count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17864#M2525</link>
      <description>&lt;P&gt;use lookup tables , list the product id you're looking for in csv and add a seen field to it:&lt;BR /&gt;&lt;BR /&gt;
productid,seen&lt;BR /&gt;&lt;BR /&gt;
645,1&lt;BR /&gt;&lt;BR /&gt;
423,1&lt;BR /&gt;
and so on&lt;BR /&gt;&lt;BR /&gt;
then run the search&lt;BR /&gt;&lt;BR /&gt;
activated=true | lookup yourlookuptable productid OUTPUT seen | Where seen!=1&lt;BR /&gt;&lt;BR /&gt;
you can read more on lookup tables at:&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/knowledge/Addfieldsfromexternaldatasources"&gt;docs.splunk.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2012 06:44:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17864#M2525</guid>
      <dc:creator>gooza</dc:creator>
      <dc:date>2012-04-04T06:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with specific product id count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17865#M2526</link>
      <description>&lt;P&gt;if you look at gooza's answer, you can do it with a lookup table. it's actually better (much better) with a subsearch and a lookup definedd like he has, and then doing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;activated=true NOT [ inputlookup yourlookuptable | return 10000 productid ] | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which will work with up to 10000 productids.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2012 14:38:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-specific-product-id-count/m-p/17865#M2526</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-04-04T14:38:06Z</dc:date>
    </item>
  </channel>
</rss>

