<?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: Cisco VPN total user duration in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40080#M69864</link>
    <description>&lt;P&gt;Can you see the field "Duration" in the field picker (on the left side)? What's the exact search you're running?&lt;/P&gt;</description>
    <pubDate>Wed, 02 May 2012 08:31:12 GMT</pubDate>
    <dc:creator>ziegfried</dc:creator>
    <dc:date>2012-05-02T08:31:12Z</dc:date>
    <item>
      <title>Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40070#M69854</link>
      <description>&lt;P&gt;i would like to total the time that each user is logged in to the VPN.&lt;/P&gt;

&lt;P&gt;This is what one of my logs looks like.&lt;/P&gt;

&lt;P&gt;Apr 30 00:48:25 "ip_address" Apr 30 2012 00:48:25: %ASA-4-113019: Group = "Group", &lt;BR /&gt;
&lt;STRONG&gt;Username = "User"&lt;/STRONG&gt;, IP = "ip_address", &lt;BR /&gt;
Session disconnected. Session Type: SSL, &lt;STRONG&gt;Duration: 1h:59m:24s&lt;/STRONG&gt;, Bytes xmt: 86659734, &lt;BR /&gt;
Bytes rcv: 4557700, Reason: User Requested&lt;BR /&gt;
host="ip_address"   |  Group="Group" |  &lt;STRONG&gt;Username="User"&lt;/STRONG&gt;  |  Session_Type=Session Type: SSL  |  &lt;STRONG&gt;Duration=1h:59m:24s&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;After totaling the durations i would like to graph each user.&lt;BR /&gt;
I have tried to use (eval, stats, and strptime) but cannot get any to work on this correctly.&lt;/P&gt;

&lt;P&gt;If someone could help. What would the search string look like in order to do this?&lt;/P&gt;

&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:45:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40070#M69854</guid>
      <dc:creator>boss3668</dc:creator>
      <dc:date>2020-09-28T11:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40071#M69855</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;... | rex field=Duration "((?&amp;lt;dur_h&amp;gt;\d+)h:)?(?&amp;lt;dur_m&amp;gt;\d+)m:(?&amp;lt;dur_s&amp;gt;\d+)s" | eval duration=dur_s+60*dur_m+3600*coalesce(dur_h,0) | stats sum(duration) as total_duration by Username
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Apr 2012 17:55:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40071#M69855</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-04-30T17:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40072#M69856</link>
      <description>&lt;P&gt;You could also &lt;CODE&gt;| eval dur=strptime(Duration, "%Hh:%Mm:%Ss")&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2012 18:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40072#M69856</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-04-30T18:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40073#M69857</link>
      <description>&lt;P&gt;It's a different result, though. This will result in Today's epoch time plus the duration.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2012 18:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40073#M69857</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-04-30T18:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40074#M69858</link>
      <description>&lt;P&gt;The answer from ziegried does return results without error.  The Username field is shown with the usernames listed but the total_duration field that is created is blank.  Any ideas on why that would be?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2012 18:36:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40074#M69858</guid>
      <dc:creator>boss3668</dc:creator>
      <dc:date>2012-04-30T18:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40075#M69859</link>
      <description>&lt;P&gt;There's a field "Duration" in your results, right?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2012 18:39:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40075#M69859</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-04-30T18:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40076#M69860</link>
      <description>&lt;P&gt;Hmm, noted.  It seems that mktime (available in convert) does the same thing.  Seconds math it is!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2012 18:50:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40076#M69860</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-04-30T18:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40077#M69861</link>
      <description>&lt;P&gt;correct, "Duration" is exactly as it appears in the log statement from my initial question.  That is definitely the field we are trying to get the cumulative duration of a user from  It did create the total_duration field and the Usernames were listed just no data at all in the total_duration output.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40077#M69861</guid>
      <dc:creator>boss3668</dc:creator>
      <dc:date>2020-09-28T11:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40078#M69862</link>
      <description>&lt;P&gt;if you execute the search without the trailing stats command, can you see any extracted dur_* fields?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=Duration "((?&amp;lt;dur_h&amp;gt;\d+)h:)?(?&amp;lt;dur_m&amp;gt;\d+)m:(?&amp;lt;dur_s&amp;gt;\d+)s" | eval duration=dur_s+60*dur_m+3600*coalesce(dur_h,0) | table dur*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Apr 2012 20:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40078#M69862</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-04-30T20:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40079#M69863</link>
      <description>&lt;P&gt;No, I get no results found.  Sorry if i'm missing something small, i'm very new to splunk.  It doesn't return an error, but it does not return any extracted dur_* fields&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2012 12:33:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40079#M69863</guid>
      <dc:creator>boss3668</dc:creator>
      <dc:date>2012-05-01T12:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40080#M69864</link>
      <description>&lt;P&gt;Can you see the field "Duration" in the field picker (on the left side)? What's the exact search you're running?&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 08:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40080#M69864</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-05-02T08:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40081#M69865</link>
      <description>&lt;P&gt;I re-ran the search with just the host and your search and I did get results!  now I have to figure out how to turn it back into human readable time, but it looks like the string you sent works great, I must have messed something up when I tried it before.  Thank you for the great help with this.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 13:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40081#M69865</guid>
      <dc:creator>boss3668</dc:creator>
      <dc:date>2012-05-02T13:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40082#M69866</link>
      <description>&lt;P&gt;Hi, I'm very glad to have found this thread as I am trying to get the same information from Splunk, however I'm not getting any results past the table, which only contains the user names. I've even tried shortening the query to the table portion, however I still do not receive data.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 20:42:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40082#M69866</guid>
      <dc:creator>eegilbert</dc:creator>
      <dc:date>2012-05-30T20:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40083#M69867</link>
      <description>&lt;P&gt;The original log event looks something like this:&lt;/P&gt;

&lt;P&gt;Apr 30 00:48:25 "ip_address" Apr 30 2012 00:48:25: %ASA-4-113019: Group = "Group", Username = "User", IP = "ip_address", Session disconnected. Session Type: SSL, Duration: 1h:59m:24s, Bytes xmt: 86659734, Bytes rcv: 4557700, Reason: User Requested&lt;/P&gt;

&lt;P&gt;By default, Splunk will do automatic Key=Value extraction, meaning that in this case, it will only find Group, Username, and IP.  You'll have to write field extraction rules to collect the other values from the log event.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:53:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40083#M69867</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2020-09-28T11:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40084#M69868</link>
      <description>&lt;P&gt;Thank you, Sowings. That was the hint I needed. I created a field called duration with the field extractor and then made sure it was one of the selected fields.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2012 17:16:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40084#M69868</guid>
      <dc:creator>eegilbert</dc:creator>
      <dc:date>2012-05-31T17:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40085#M69869</link>
      <description>&lt;P&gt;rex field=Duration&lt;/P&gt;

&lt;P&gt;duration must have a lower case "d" for it to work&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 11:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40085#M69869</guid>
      <dc:creator>gilbou</dc:creator>
      <dc:date>2015-02-12T11:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco VPN total user duration</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40086#M69870</link>
      <description>&lt;P&gt;In the 1st search posted, rex field=Duration&lt;/P&gt;

&lt;P&gt;duration must have a lower case "d" for it to work&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 11:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Cisco-VPN-total-user-duration/m-p/40086#M69870</guid>
      <dc:creator>gilbou</dc:creator>
      <dc:date>2015-02-12T11:01:33Z</dc:date>
    </item>
  </channel>
</rss>

