<?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: Time on websites (total session times) in Security</title>
    <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71063#M2354</link>
    <description>&lt;P&gt;You could by service say 80 or 443&lt;BR /&gt;
but the max pause will still be an issue&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jun 2013 13:27:20 GMT</pubDate>
    <dc:creator>carfi</dc:creator>
    <dc:date>2013-06-22T13:27:20Z</dc:date>
    <item>
      <title>Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71055#M2346</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;We have as you would expect a bunch of firewall / content keeper logs in our splunk instance and or splunk guys wish to report on the time a user spends on each website (domain).&lt;/P&gt;

&lt;P&gt;Basically, I am trying to see if there is any "easy"...ish, way of a determining a "session" for each domain and then adding them to display the the total time a user spends on each domain (roughly).&lt;/P&gt;

&lt;P&gt;Lets say we start with a generic search against my firewall logs and a specific user.&lt;BR /&gt;
Leaving us with an output of a single users requests in chronological order.&lt;/P&gt;

&lt;P&gt;ANY help you could provide would be very very appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Aaron.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2011 00:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71055#M2346</guid>
      <dc:creator>aaronnicoli</dc:creator>
      <dc:date>2011-09-07T00:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71056#M2347</link>
      <description>&lt;P&gt;I have had this same discussion with a customer some months ago. Here is what I sent them:&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;The problem I thought of with this is--what exactly are you measuring?&lt;BR /&gt;
http is connectionless, so there isn't exactly a start and end of a&lt;BR /&gt;
session to track...&lt;/P&gt;

&lt;P&gt;I came up with some scenarios:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;User is interacting with a travel booking site. For the duration of&lt;BR /&gt;
their activities, there will be a stream of http traffic, puts and gets&lt;BR /&gt;
etc. No problem here.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;User opens a newspaper or mag and reads a long article. You might have one set&lt;BR /&gt;
of interactions as they get the page; they might sit there reading it&lt;BR /&gt;
for half an hour. You won't know anything until they browse the next web&lt;BR /&gt;
site. Alternatively, they might skim it in a minute and leave it open&lt;BR /&gt;
for half an hour in background. What, then, is the duration of their&lt;BR /&gt;
stay at the site?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;User opens multiple bookmarks in tabs but doesn't read any of them.&lt;BR /&gt;
Any traffic information here might be highly misleading; they might not&lt;BR /&gt;
in fact interact with any, but they could be open on the screen all day.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I don't think what you want to do can be done in a meaningful way--not with splunk anyway.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2011 01:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71056#M2347</guid>
      <dc:creator>cmeo</dc:creator>
      <dc:date>2011-09-07T01:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71057#M2348</link>
      <description>&lt;P&gt;I completely agree and that's what I told the group in the first place.&lt;/P&gt;

&lt;P&gt;However, they are keen to at least have some stats that can look &lt;EM&gt;shiny&lt;/EM&gt;... no matter how pointless they truly are.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2011 04:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71057#M2348</guid>
      <dc:creator>aaronnicoli</dc:creator>
      <dc:date>2011-09-07T04:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71058#M2349</link>
      <description>&lt;P&gt;The key would be session time, in other words lets say we make it a "magical" 30 minutes.&lt;/P&gt;

&lt;P&gt;So, said user connects to a site, then 10 minutes later they connect again... another 5 minutes goes on and they connect once more... then three days later they reconnect and again 60 seconds later... that's it for the month.&lt;/P&gt;

&lt;P&gt;This means they spent a total of 10 + 5 + 1 = 16 minutes &lt;EM&gt;on&lt;/EM&gt; that site.&lt;/P&gt;

&lt;P&gt;There's no way of even contemplating such a thing...?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2011 04:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71058#M2349</guid>
      <dc:creator>aaronnicoli</dc:creator>
      <dc:date>2011-09-07T04:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71059#M2350</link>
      <description>&lt;P&gt;As you've already discussed it's hard to get &lt;EM&gt;really&lt;/EM&gt; meaningful stats for the reasons cmeo outlines. But, it's certainly possible to create the stats based on the rules you suggested.&lt;/P&gt;

&lt;P&gt;If using the firewall logs for this, I don't know exactly what fields are at your disposal - but let's say you have at least a source IP, a destination IP and a destination port. Our unique identifier for a certain web session could be based on these fields. In that case it's possible to build a &lt;EM&gt;transaction&lt;/EM&gt; that joins separate events together to a new combined event (a transaction) based on rules that you specify. Upon creating a transaction, Splunk will write the time difference between its first and last event into a field called &lt;CODE&gt;duration&lt;/CODE&gt;. What you do is create this transaction saying "join events having the same source IP, destination IP and port, but only if it's less than 30 minutes between one event and the next". Translated to a search, this would look something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourbasesearch&amp;gt;
| transaction src_ip dest_ip dest_port maxpause=30m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OK, now you have a bunch of transactions with corresponding duration fields that you need to sum together for each "session" to create a grand total. Use &lt;CODE&gt;stats&lt;/CODE&gt; for this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourbasesearch&amp;gt;
| transaction src_ip dest_ip dest_port maxpause=30m
| stats sum(duration) AS session_time by src_ip,dest_ip,dest_port
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give you a table with a list of "total session times" for each srcIP/destIP/destport pair that was found in your search, according to the rules you specified.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2011 05:15:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71059#M2350</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-09-07T05:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71060#M2351</link>
      <description>&lt;P&gt;You have answered (and explained) absolutely everything I wanted!&lt;BR /&gt;
Thank you so, so much!&lt;/P&gt;

&lt;P&gt;I can now generate exactly what they're after.&lt;BR /&gt;
Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2011 21:44:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71060#M2351</guid>
      <dc:creator>aaronnicoli</dc:creator>
      <dc:date>2011-09-07T21:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71061#M2352</link>
      <description>&lt;P&gt;Another thing that would be useful is if webapp session cookies were logged when they are used (like J2EE JSESSIONID) -- then you could identify distinct user sessions according to the activity presented by that session ID&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 15:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71061#M2352</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-09-09T15:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71062#M2353</link>
      <description>&lt;P&gt;Hmmm... I appear to have something happening that's not quite what I'm after.&lt;BR /&gt;
Technically, the total time on a single domain should not be able to exceed the time period of the logs specificed.&lt;BR /&gt;
Ie. I have a base search containing 3 days of logs, means I can't be on the site "google.com" for more than 3 days in total.&lt;BR /&gt;
However, with this search... I am... about 27 days infact.&lt;BR /&gt;
Is there no way of calculating this like how I mentioned earlier?&lt;BR /&gt;
Basically so that the "period" spent on a site is calculated by an actual "timeout" value, rather than just assigning a period of time for every "hit".&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2011 00:55:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71062#M2353</guid>
      <dc:creator>aaronnicoli</dc:creator>
      <dc:date>2011-09-12T00:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Time on websites (total session times)</title>
      <link>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71063#M2354</link>
      <description>&lt;P&gt;You could by service say 80 or 443&lt;BR /&gt;
but the max pause will still be an issue&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2013 13:27:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Time-on-websites-total-session-times/m-p/71063#M2354</guid>
      <dc:creator>carfi</dc:creator>
      <dc:date>2013-06-22T13:27:20Z</dc:date>
    </item>
  </channel>
</rss>

