<?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 How to create a search for stats count eval? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589705#M205330</link>
    <description>&lt;P&gt;hi&lt;/P&gt;
&lt;P&gt;I need to use eval count in a search like this&lt;/P&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;
&lt;LI-CODE lang="markup"&gt;| chart count(eval(web &amp;gt; 12)) &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;
&lt;P&gt;But this count is right if I filter events préviously from a string&lt;/P&gt;
&lt;P&gt;what I would like to do is something like this&lt;/P&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;
&lt;LI-CODE lang="markup"&gt;| chart count(eval(web &amp;gt; 12 AND TOTO=a)) &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;
&lt;P&gt;NB: I know I can filter before the chart command but its impossible here because my chart command stats a lot of different events...&lt;/P&gt;
&lt;P&gt;How to do this please?&lt;/P&gt;
&lt;P&gt;Rgds&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2022 04:55:05 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2022-03-23T04:55:05Z</dc:date>
    <item>
      <title>How to create a search for stats count eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589705#M205330</link>
      <description>&lt;P&gt;hi&lt;/P&gt;
&lt;P&gt;I need to use eval count in a search like this&lt;/P&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;
&lt;LI-CODE lang="markup"&gt;| chart count(eval(web &amp;gt; 12)) &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;
&lt;P&gt;But this count is right if I filter events préviously from a string&lt;/P&gt;
&lt;P&gt;what I would like to do is something like this&lt;/P&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;
&lt;LI-CODE lang="markup"&gt;| chart count(eval(web &amp;gt; 12 AND TOTO=a)) &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;
&lt;P&gt;NB: I know I can filter before the chart command but its impossible here because my chart command stats a lot of different events...&lt;/P&gt;
&lt;P&gt;How to do this please?&lt;/P&gt;
&lt;P&gt;Rgds&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 04:55:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589705#M205330</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-23T04:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this stats count eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589711#M205332</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval counter=if(web &amp;gt; 12 AND TOTO=a, 1, 0)
| chart sum(counter)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Mar 2022 15:25:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589711#M205332</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-18T15:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this stats count eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589713#M205334</link>
      <description>&lt;PRE&gt;| chart count(eval(web &amp;gt; 12 AND TOTO=a)) &lt;/PRE&gt;&lt;P&gt;Something like this should work. Did you try it? Is "a" a field OR a string?&amp;nbsp; If it's a string, try enclosing it in double quotes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 15:29:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589713#M205334</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-03-18T15:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this stats count eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589725#M205339</link>
      <description>&lt;P&gt;I dont undesrtand&lt;/P&gt;&lt;P&gt;even if I change the web_dom value, the result is the same!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval errcap =if(web &amp;gt;= 1 AND web_dom="aa" AND web_url="*", 1, 0) 
| eval errcont =if(we &amp;gt;= 1 AND web_dom="bb", 1, 0)  
| eval errshare =if(web= 1 AND web_dom="cc", 1, 0) 
| chart count(errcap) as "errcap", count(errcont) as "errcont", count(errshare) as "errshare" over Time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 16:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/589725#M205339</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-18T16:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this stats count eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/590159#M205462</link>
      <description>&lt;P&gt;I have something very strange&lt;/P&gt;&lt;P&gt;if i add a clause like web_error_code and I assign it a value (404) in the example it works&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval errshare =if(web_error_count &amp;gt;= 1 AND web_error_code=404 AND web_domain="sharepoint.com", 1, 0) 
| stats sum(errshare)&lt;/LI-CODE&gt;&lt;P&gt;what is put "*" instead 404, I have no results!&lt;/P&gt;&lt;P&gt;what is wrong please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval errshare =if(web_error_count &amp;gt;= 1 AND web_error_code="*" AND web_domain="sharepoint.com", 1, 0) 
| stats sum(errshare)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 15:31:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/590159#M205462</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-22T15:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this stats count eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/590258#M205499</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I found, it's Wild card for eval and where is not "*" (it only works with search command)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 16:23:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-for-stats-count-eval/m-p/590258#M205499</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-03-22T16:23:22Z</dc:date>
    </item>
  </channel>
</rss>

