<?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 Concurrent active users in Security</title>
    <link>https://community.splunk.com/t5/Security/Concurrent-active-users/m-p/178408#M14759</link>
    <description>&lt;P&gt;I have the following input: session id, login time, logout time.&lt;BR /&gt;
I'm trying to get a graph of concurrent active users within the login/logout time range.&lt;BR /&gt;
For example if i have the following dataset:&lt;BR /&gt;
sid, login time,     logout&lt;BR /&gt;
1, 2014-05-26 11:00, 2014-05-26 15:00&lt;BR /&gt;
2, 2014-05-26 12:00, 2014-05-26 13:00 &lt;BR /&gt;
3, 2014-05-26 13:00, 2014-05-26 14:00 &lt;/P&gt;

&lt;P&gt;I would like to get a graph which span on each hour with the following results:&lt;BR /&gt;
11:00-12:00 1 concurrent users&lt;BR /&gt;
12:00-13:00 2 concurrent users&lt;BR /&gt;
14:00-15:00 2 concurrent users&lt;/P&gt;</description>
    <pubDate>Mon, 26 May 2014 16:01:55 GMT</pubDate>
    <dc:creator>rklein</dc:creator>
    <dc:date>2014-05-26T16:01:55Z</dc:date>
    <item>
      <title>Concurrent active users</title>
      <link>https://community.splunk.com/t5/Security/Concurrent-active-users/m-p/178408#M14759</link>
      <description>&lt;P&gt;I have the following input: session id, login time, logout time.&lt;BR /&gt;
I'm trying to get a graph of concurrent active users within the login/logout time range.&lt;BR /&gt;
For example if i have the following dataset:&lt;BR /&gt;
sid, login time,     logout&lt;BR /&gt;
1, 2014-05-26 11:00, 2014-05-26 15:00&lt;BR /&gt;
2, 2014-05-26 12:00, 2014-05-26 13:00 &lt;BR /&gt;
3, 2014-05-26 13:00, 2014-05-26 14:00 &lt;/P&gt;

&lt;P&gt;I would like to get a graph which span on each hour with the following results:&lt;BR /&gt;
11:00-12:00 1 concurrent users&lt;BR /&gt;
12:00-13:00 2 concurrent users&lt;BR /&gt;
14:00-15:00 2 concurrent users&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2014 16:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Concurrent-active-users/m-p/178408#M14759</guid>
      <dc:creator>rklein</dc:creator>
      <dc:date>2014-05-26T16:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrent active users</title>
      <link>https://community.splunk.com/t5/Security/Concurrent-active-users/m-p/178409#M14760</link>
      <description>&lt;P&gt;Here is the only way that I can think of to do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| eval ts=login_time . ";" . logout | makemv delim=";" ts
| mvexpand ts
| eval ts_epoch = strptime(ts, "%Y-%m-%d %H:%M")
| sort ts_epoch
| eval counter=if(ts==login_time,1,-1)
| streamstats sum(counter) as concurrent_users 
| bucket ts_epoch span=1h
| chart avg(concurrent_users) as "Avg Concurrent Users" by ts_epoch
| ts = strftime(ts_epoch, "%Y-%m-%d %H:%M")
| table ts "Avg Concurrent Users"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 May 2014 19:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Concurrent-active-users/m-p/178409#M14760</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-05-26T19:11:19Z</dc:date>
    </item>
  </channel>
</rss>

