<?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 events per user, showing average latency in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123011#M33200</link>
    <description>&lt;P&gt;should work,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=www NOT hck=* user=&amp;lt; user &amp;gt; | eventstats avg(time_taken) as latency | stats count(user) by latency | rename latency as "latency (1s)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;UPDATE:&lt;/P&gt;

&lt;P&gt;perhaps this is what you're after:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=www NOT hck=* user=* | stats count as hits, avg(time_taken) as "latency(1s)" by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2013 21:35:28 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-10-30T21:35:28Z</dc:date>
    <item>
      <title>count events per user, showing average latency</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123010#M33199</link>
      <description>&lt;P&gt;I am attempting to count the number of times a user has made a web server 'hit', and also display the average latency of that/those users.&lt;/P&gt;

&lt;P&gt;Search Query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=www NOT hck=* user=&amp;lt; user &amp;gt; | stats avg(time_taken) as "latency(1s)" | stats count(user) by latency(1s)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can't seem to get the fields to come out right, either I get just the latency, or the count and the latency without the user. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 21:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123010#M33199</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2013-10-30T21:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: count events per user, showing average latency</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123011#M33200</link>
      <description>&lt;P&gt;should work,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=www NOT hck=* user=&amp;lt; user &amp;gt; | eventstats avg(time_taken) as latency | stats count(user) by latency | rename latency as "latency (1s)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;UPDATE:&lt;/P&gt;

&lt;P&gt;perhaps this is what you're after:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=www NOT hck=* user=* | stats count as hits, avg(time_taken) as "latency(1s)" by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 21:35:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123011#M33200</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-30T21:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: count events per user, showing average latency</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123012#M33201</link>
      <description>&lt;P&gt;Or wait. That does not seem right. What do you really want? Provide sample events and sketch of desired output, please&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 21:39:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123012#M33201</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-30T21:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: count events per user, showing average latency</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123013#M33202</link>
      <description>&lt;P&gt;Actually I just tweeked this a little bit, but you were pretty much spot on. Here is the final search:&lt;BR /&gt;
sourcetype=www NOT hck=* | eval user=user."@".domain | stats count as hits, avg(time_taken) as "avg latency(1s)" by user | sort - "avg latency(1s)"&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2013 13:40:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-per-user-showing-average-latency/m-p/123013#M33202</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2013-11-01T13:40:39Z</dc:date>
    </item>
  </channel>
</rss>

