<?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: How to write a search to find users that are actually connected with VPN from Cisco logs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234329#M69636</link>
    <description>&lt;P&gt;Can you maybe give us an explanation of what the search you've created is trying to do? Are you just looking for connection attempts in your VPN logs? &lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2016 13:19:19 GMT</pubDate>
    <dc:creator>ryanoconnor</dc:creator>
    <dc:date>2016-06-29T13:19:19Z</dc:date>
    <item>
      <title>How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234328#M69635</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am creating a search to find the users that are actually connected with VPN. In the Cisco logs, I can only see the the events of &lt;CODE&gt;connect&lt;/CODE&gt; or &lt;CODE&gt;disconnect&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I have created a search with &lt;CODE&gt;append&lt;/CODE&gt; to join two searches, but the results show how many times the user has connected and disconnected.&lt;/P&gt;

&lt;P&gt;My search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index %ASA-6-113004 | rex field=_raw ".*:\s+AAA\s+(?[^:]+).*user\s+=\s+(?[^$]+)" | rename user_connected AS user | top user showperc=false | append [search index=firewall %ASA-4-113019 | rex field=_raw ".*Username\s+=\s+(?[^,]+).*,\s+(?[^.]+)" | rename user_disconnected as user | top user showperc=false]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and the result is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user            count
test                3      (number of times is disconnected)
test                4      (number of times is connected)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How I can create a search only show the users actually connected?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234328#M69635</guid>
      <dc:creator>fahrenheit</dc:creator>
      <dc:date>2016-06-29T13:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234329#M69636</link>
      <description>&lt;P&gt;Can you maybe give us an explanation of what the search you've created is trying to do? Are you just looking for connection attempts in your VPN logs? &lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234329#M69636</guid>
      <dc:creator>ryanoconnor</dc:creator>
      <dc:date>2016-06-29T13:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234330#M69637</link>
      <description>&lt;P&gt;Hi ryan, thanks to answer.&lt;/P&gt;

&lt;P&gt;I am trying to create a search for show the users are connected actually by vpn.&lt;/P&gt;

&lt;P&gt;But i have users than has various connections and disconnections during the day.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:28:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234330#M69637</guid>
      <dc:creator>fahrenheit</dc:creator>
      <dc:date>2016-06-29T13:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234331#M69638</link>
      <description>&lt;P&gt;It looks like your subsearch is looking for disconnects? Do you need to be searching for that part if you're only concerned with connections?&lt;/P&gt;

&lt;P&gt;Also do you have the Splunk Add-on for Cisco ASA installed? That will alleviate the need for regular expressions:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1620/"&gt;https://splunkbase.splunk.com/app/1620/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:34:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234331#M69638</guid>
      <dc:creator>ryanoconnor</dc:creator>
      <dc:date>2016-06-29T13:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234332#M69639</link>
      <description>&lt;P&gt;yes, subsearch is looking for disconnects.&lt;/P&gt;

&lt;P&gt;I need connections and disconnections. &lt;/P&gt;

&lt;P&gt;If i have in the last 24 hours,  3 connections and 2 disconnections. I have to subtract the disconnections to connections. The result is 1, the user is connected. If the result is 0 the user is not connected.&lt;/P&gt;

&lt;P&gt;the app of cisco asa not working. The regular expressions are done.&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234332#M69639</guid>
      <dc:creator>fahrenheit</dc:creator>
      <dc:date>2016-06-29T13:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234333#M69640</link>
      <description>&lt;P&gt;If no data is being extracted for your Cisco ASA logs you might want to review how it was installed, as there are a lot of great extractions with that add-on, including ones for users but I understand that is a separate problem. &lt;/P&gt;

&lt;P&gt;For solving this you might want to look at the transaction command (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction&lt;/A&gt;) as it is designed to do some of what you're trying to do here, just without the headaches of subsearches. &lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 13:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234333#M69640</guid>
      <dc:creator>ryanoconnor</dc:creator>
      <dc:date>2016-06-29T13:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234334#M69641</link>
      <description>&lt;P&gt;You need to fix the &lt;CODE&gt;rex&lt;/CODE&gt; commands which did not get copied/saved  correctly when you posted your search, but after that, like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=my_index %ASA-6-113004) OR (index=firewall %ASA-4-113019)
| rex ".*:\s+AAA\s+(?[^:]+).*user\s+=\s+(?[^$]+)" | rename user_connected AS user
| rex ".*Username\s+=\s+(?[^,]+).*,\s+(?[^.]+)" | rename user_disconnected as user
| dedup user
| connected = if((index=firewall), "No", "Yes")
| table user connected
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jun 2016 15:14:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234334#M69641</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-29T15:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234335#M69642</link>
      <description>&lt;P&gt;This is the search I use for our ASA:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yoursearch&amp;gt;
| transaction fields="user" maxspan=12h30m connected=f startswith="*connection established*" 
| search eventtype!=cisco_vpn_end
| dedup user 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This assumes you've downloaded the Cisco ASA TA. It also assumes that your users are limited to 12.5hr sessions before they timeout. You would need to adjust that to whatever the timeout for user sessions is.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 11:42:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234335#M69642</guid>
      <dc:creator>jmaple</dc:creator>
      <dc:date>2016-07-25T11:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to find users that are actually connected with VPN from Cisco logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234336#M69643</link>
      <description>&lt;P&gt;I just tried this and it's showing sessions that have finished. Im trying to get a count for how many currently connected. ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 04:14:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-find-users-that-are-actually-connected/m-p/234336#M69643</guid>
      <dc:creator>thewlan</dc:creator>
      <dc:date>2017-10-18T04:14:47Z</dc:date>
    </item>
  </channel>
</rss>

