<?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: Count for each ID depending on EXEC time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-for-each-ID-depending-on-EXEC-time/m-p/213670#M62679</link>
    <description>&lt;P&gt;Thanks, it was exactly what i was looking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
I just remark that it's not really relevant to show the result on a graph... Seems that Splunk miss table &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I re-write my code if can help other users : &lt;BR /&gt;
    index=...&lt;BR /&gt;
    | eval exec_time=case(&lt;BR /&gt;
       exec &amp;lt;= 50, "&amp;lt;50", &lt;BR /&gt;
       exec &amp;gt;50 AND exec &amp;lt;=100, "50 - 100", &lt;BR /&gt;
       exec &amp;gt;100 AND exec &amp;lt;=200, "101 - 200", &lt;BR /&gt;
       exec &amp;gt;200 AND exec &amp;lt;=500, "201 - 500", &lt;BR /&gt;
       exec &amp;gt;500 AND exec &amp;lt;=2000, "501 - 2000") &lt;BR /&gt;
   | stats count by exec_time, id&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:29:14 GMT</pubDate>
    <dc:creator>BaptVe</dc:creator>
    <dc:date>2020-09-29T09:29:14Z</dc:date>
    <item>
      <title>Count for each ID depending on EXEC time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-for-each-ID-depending-on-EXEC-time/m-p/213668#M62677</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm searching a way to sort a number of events depending on the value of a field :&lt;BR /&gt;
One event has a field EXEC, which is an execution time and an ID.&lt;/P&gt;

&lt;P&gt;I want to count the number of events that has an exec &amp;gt; 10000, exec between 10000 AND 8000, ...&lt;BR /&gt;
I was imagining it like this : &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="table"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1266i950119202E5E641E/image-size/large?v=v2&amp;amp;px=999" role="button" title="table" alt="table" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I'm searching at the moment with : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=... exec&amp;gt;10000 | stats count as Events by id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which return me the numbers of events that has an exec &amp;gt; 10000 for each id. Searching with some if condition but without any results .&lt;/P&gt;

&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2016 09:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-for-each-ID-depending-on-EXEC-time/m-p/213668#M62677</guid>
      <dc:creator>BaptVe</dc:creator>
      <dc:date>2016-04-25T09:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count for each ID depending on EXEC time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-for-each-ID-depending-on-EXEC-time/m-p/213669#M62678</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;You could use eval function:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval exec_time=case(exec &amp;gt; 1000, "&amp;gt;1000", exec &amp;gt;=1000 AND exec &amp;lt; 8000, "1000-8000") | stats count by exec_time, id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Apr 2016 09:42:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-for-each-ID-depending-on-EXEC-time/m-p/213669#M62678</guid>
      <dc:creator>ctaf</dc:creator>
      <dc:date>2016-04-25T09:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count for each ID depending on EXEC time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-for-each-ID-depending-on-EXEC-time/m-p/213670#M62679</link>
      <description>&lt;P&gt;Thanks, it was exactly what i was looking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
I just remark that it's not really relevant to show the result on a graph... Seems that Splunk miss table &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I re-write my code if can help other users : &lt;BR /&gt;
    index=...&lt;BR /&gt;
    | eval exec_time=case(&lt;BR /&gt;
       exec &amp;lt;= 50, "&amp;lt;50", &lt;BR /&gt;
       exec &amp;gt;50 AND exec &amp;lt;=100, "50 - 100", &lt;BR /&gt;
       exec &amp;gt;100 AND exec &amp;lt;=200, "101 - 200", &lt;BR /&gt;
       exec &amp;gt;200 AND exec &amp;lt;=500, "201 - 500", &lt;BR /&gt;
       exec &amp;gt;500 AND exec &amp;lt;=2000, "501 - 2000") &lt;BR /&gt;
   | stats count by exec_time, id&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:29:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-for-each-ID-depending-on-EXEC-time/m-p/213670#M62679</guid>
      <dc:creator>BaptVe</dc:creator>
      <dc:date>2020-09-29T09:29:14Z</dc:date>
    </item>
  </channel>
</rss>

