<?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: Concurrency group by clause in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199700#M187522</link>
    <description>&lt;P&gt;Hi MuS,&lt;BR /&gt;
Thanks for you answer, but it does not address the fundamental problem with the concurrency command, in that the concurrency will be calculated on all data passed into it rather than being calculated seperately for sub-sets of the data based on a grouping field (in my example 'locat').&lt;/P&gt;

&lt;P&gt;Also, I already have a duration field 'call_duration' and so do not need to calculate one and the timeDelta calculation is not the way phone calls work. The duration of a phone call is not related to the event time of the previous one and so a time delta does not represent the duration of a call.&lt;BR /&gt;
CMiles&lt;/P&gt;</description>
    <pubDate>Thu, 27 Mar 2014 21:16:54 GMT</pubDate>
    <dc:creator>cmiles416</dc:creator>
    <dc:date>2014-03-27T21:16:54Z</dc:date>
    <item>
      <title>Concurrency group by clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199698#M187520</link>
      <description>&lt;P&gt;I have an application to analyse phone call data from multiple locations.&lt;/P&gt;

&lt;P&gt;I want to generate a report that provides a time history of concurrent calls at each location.&lt;/P&gt;

&lt;P&gt;Using this query I can get exactly what I want for a single location:&lt;/P&gt;

&lt;P&gt;index=calls locat=8374 | eval start_epoch=strptime(start_time,"%Y-%m-%d %H:%M:%S") | concurrency duration=call_duration start=start_epoch | timechart max(concurrency)&lt;/P&gt;

&lt;P&gt;However, when I use all locations (as below) I get incorrect data:&lt;/P&gt;

&lt;P&gt;index=calls locat=* | eval start_epoch=strptime(start_time,"%Y-%m-%d %H:%M:%S") | concurrency duration=call_duration start=start_epoch | timechart max(concurrency)&lt;/P&gt;

&lt;P&gt;I've established that the concurrency command determines concurrency for all data passed into it and even when the output is split by 'location', the concurrency for each location is determined from the data for all locations rather than the data for each location seperately.&lt;/P&gt;

&lt;P&gt;My suggestion would be to add a 'group by xxx' clause to the concurrency command that will calculate the concurrency seperately for the data associated to each occurance of field xxx.&lt;/P&gt;

&lt;P&gt;Alternatively, does anyone know of a way to achieve the result I am looking for within the current functionality of Splunk?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 03:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199698#M187520</guid>
      <dc:creator>cmiles416</dc:creator>
      <dc:date>2014-03-27T03:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrency group by clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199699#M187521</link>
      <description>&lt;P&gt;Hi cmiles416,&lt;/P&gt;

&lt;P&gt;I'm honest, I don't fully understand your request...but let me show you a run everywhere example in which I 'group by xxx' and use &lt;CODE&gt;concurrency&lt;/CODE&gt; after that. First I run this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal series=* 
| eventstats count by series
| delta _time AS timeDelta p=1
| eval timeDelta=abs(timeDelta) 
| concurrency duration=timeDelta  
| timechart span=1h max(concurrency) by series
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will search in &lt;CODE&gt;index=_internal&lt;/CODE&gt; for all &lt;CODE&gt;series&lt;/CODE&gt;, then the &lt;CODE&gt;eventstats&lt;/CODE&gt; will group it for you and keeps all other fields as well. What happens next is some SplunkFu Magic to setup some dummy duration field with &lt;CODE&gt;delta&lt;/CODE&gt;, &lt;CODE&gt;eval&lt;/CODE&gt; and &lt;CODE&gt;concurrency&lt;/CODE&gt; and in the last step I use &lt;CODE&gt;timechart by series&lt;/CODE&gt; to display &lt;CODE&gt;max&lt;/CODE&gt; values of &lt;CODE&gt;concurrency&lt;/CODE&gt; for each &lt;CODE&gt;series&lt;/CODE&gt; over a &lt;CODE&gt;_time&lt;/CODE&gt; span of one hour.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 07:07:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199699#M187521</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-27T07:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrency group by clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199700#M187522</link>
      <description>&lt;P&gt;Hi MuS,&lt;BR /&gt;
Thanks for you answer, but it does not address the fundamental problem with the concurrency command, in that the concurrency will be calculated on all data passed into it rather than being calculated seperately for sub-sets of the data based on a grouping field (in my example 'locat').&lt;/P&gt;

&lt;P&gt;Also, I already have a duration field 'call_duration' and so do not need to calculate one and the timeDelta calculation is not the way phone calls work. The duration of a phone call is not related to the event time of the previous one and so a time delta does not represent the duration of a call.&lt;BR /&gt;
CMiles&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 21:16:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199700#M187522</guid>
      <dc:creator>cmiles416</dc:creator>
      <dc:date>2014-03-27T21:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrency group by clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199701#M187523</link>
      <description>&lt;P&gt;This is how the problem has been expressed previously if this helps clarify.&lt;BR /&gt;
'We have a bunch of applications which we need to monitor execution of for licensing reasons. I'm taking the Windows Event Log output, which is capture process startup and termination events and combining these into transactions for these applications.&lt;BR /&gt;
However, I need to be able to work out maximum concurrent usage of each application. I could do this by running a new query for each application, but it would far more efficient to just run one query that is able to deduce the concurrency split by process executable.'&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 21:20:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199701#M187523</guid>
      <dc:creator>cmiles416</dc:creator>
      <dc:date>2014-03-27T21:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrency group by clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199702#M187524</link>
      <description>&lt;P&gt;I also have a similar situation, and created the following search to accomplish what I need:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values(job) AS job, max(_time) AS maxTime, min(_time) AS minTime by jobid
| streamstats current=f window=1 global=f last(maxTime) as last_maxTime by job
| eval _time=minTime
| table _time, job, jobid, minTime, maxTime, last_maxTime
| eval overlapped=if(last_maxTime&amp;gt;=minTime,1,0)
| where overlapped=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this case, I use stats, instead of transaction, to get the start and end time of the event (based off jobid, which is a unique id for each event). Then I do a streamstats to get the previous end time to compare to my start time, if the end time of the previous event is &amp;gt;= the current start time, then I set a flag called overlapped, and filter to those.&lt;/P&gt;

&lt;P&gt;This does not get a count of the number of events in that event time range, but works for my purposes.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 22:10:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/199702#M187524</guid>
      <dc:creator>lshatzer</dc:creator>
      <dc:date>2016-11-02T22:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrency group by clause</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/698338#M237147</link>
      <description>&lt;P&gt;See also:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-use-the-concurrency-command-to-timechart-the-top-10/m-p/698332/highlight/true#M237145" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-use-the-concurrency-command-to-timechart-the-top-10/m-p/698332/highlight/true#M237145&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 20:23:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concurrency-group-by-clause/m-p/698338#M237147</guid>
      <dc:creator>popovr</dc:creator>
      <dc:date>2024-09-05T20:23:25Z</dc:date>
    </item>
  </channel>
</rss>

