<?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: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388391#M113241</link>
    <description>&lt;P&gt;One way would be to have a list of users in a lookuptable, say vpn_users.csv with 2 columns - user, status. The search can then be modified to something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="gw_pfsense" authenticated | rex field=_raw "user \'(?&amp;lt;user&amp;gt;.*)\' auth" |inputlookup vpn_users.csv user OUTPUT status | where isnull(status)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, if you find users who haven't authenticated in the last 7 days, you would get isnull(status) to true. You can then update rest of your searches as per your needs&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2019 22:01:32 GMT</pubDate>
    <dc:creator>lakshman239</dc:creator>
    <dc:date>2019-04-02T22:01:32Z</dc:date>
    <item>
      <title>Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388390#M113240</link>
      <description>&lt;P&gt;New to Splunk and I am learning as much as I can. I am trying to build on a query I have that shows the users who have connected via VPN for the last 7 days; the use case goal is to show users that have NOT connected to the VPN within the last 7 days. &lt;/P&gt;

&lt;P&gt;Here is the query that shows the users for the last 7 days: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="gw_pfsense" authenticated | rex field=_raw "user \'(?&amp;lt;user&amp;gt;.*)\' auth" | stats latest(_time) as Time by user | eval Time=strftime(Time, "%m/%d/%Y %H:%M:%S") | dedup user | sort user | table user, Time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I believe the best way might be a comparison against a list of users not seen in this report. I'm not sure how to do this. Looking for some guidance or tips&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 16:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388390#M113240</guid>
      <dc:creator>bluecollar</dc:creator>
      <dc:date>2019-04-02T16:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388391#M113241</link>
      <description>&lt;P&gt;One way would be to have a list of users in a lookuptable, say vpn_users.csv with 2 columns - user, status. The search can then be modified to something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="gw_pfsense" authenticated | rex field=_raw "user \'(?&amp;lt;user&amp;gt;.*)\' auth" |inputlookup vpn_users.csv user OUTPUT status | where isnull(status)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, if you find users who haven't authenticated in the last 7 days, you would get isnull(status) to true. You can then update rest of your searches as per your needs&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 22:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388391#M113241</guid>
      <dc:creator>lakshman239</dc:creator>
      <dc:date>2019-04-02T22:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388392#M113242</link>
      <description>&lt;P&gt;Thank you for the recommendation, I like that angle, however Im getting an error.. &amp;lt; &lt;STRONG&gt;Error in 'inputlookup' command: Invalid argument: 'user'&lt;/STRONG&gt; &amp;gt;&lt;/P&gt;

&lt;P&gt;Here is my transforms.conf entry&lt;BR /&gt;
[vpn_users]&lt;BR /&gt;
filename = vpn_users.csv&lt;/P&gt;

&lt;P&gt;and my props.conf entry attempts..&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;[vpn_users]&lt;BR /&gt;
INPUTLOOKUP OUTPUT status&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;tried this also&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;LOOKUP-vpn_users = my_lookup user OUTPUT status&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Any further help is appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388392#M113242</guid>
      <dc:creator>bluecollar</dc:creator>
      <dc:date>2020-09-29T23:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388393#M113243</link>
      <description>&lt;P&gt;Your props.conf should have something like:&lt;/P&gt;

&lt;P&gt;[your_sourcetype]&lt;BR /&gt;
EXTRACT-user = "user \'(?.*)\' auth"&lt;BR /&gt;&lt;BR /&gt;
LOOKUP-matchVPNusers = vpn_users user OUTPUT status&lt;/P&gt;

&lt;P&gt;Note: you need an EXTRACT or REPORT to extract 'user' which can be used as input for the lookup transforms, as you are using automatic lookup extractions. If you don't need automatic lookup, you need not define LOOKUP in the props.conf&lt;/P&gt;

&lt;P&gt;Your search will then have index="gw_pfsense" authenticated   , giving status field for matching records.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388393#M113243</guid>
      <dc:creator>lakshman239</dc:creator>
      <dc:date>2020-09-30T00:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388394#M113244</link>
      <description>&lt;P&gt;This now works like a champ, giving me users who have authenticated during the last 7 days.  How would I capture the inverse of this, i.e. those who HAVE NOT authenticated during the last 7 days? &lt;/P&gt;

&lt;P&gt;index="gw_pfsense" authenticated | rex field=_raw "user \'(?.*)\' auth" | lookup vpn_users.csv user OUTPUT status | where isnotnull(status)&lt;/P&gt;

&lt;P&gt;Did not work, which I believe I understand, how would I get the inverse of the status against the list, i.e those that have not authenticated&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:09:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388394#M113244</guid>
      <dc:creator>bluecollar</dc:creator>
      <dc:date>2020-09-30T00:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388395#M113245</link>
      <description>&lt;P&gt;try where isnull(status)&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 14:33:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388395#M113245</guid>
      <dc:creator>lakshman239</dc:creator>
      <dc:date>2019-04-12T14:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388396#M113246</link>
      <description>&lt;P&gt;The where isnull(status) gives me all of the users who have authenticated. I've verified this by comparing user list with logs. I am trying to find the inverse, those who would not have a status of null. &lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 15:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388396#M113246</guid>
      <dc:creator>bluecollar</dc:creator>
      <dc:date>2019-04-12T15:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query that shows users who have not connected to a VPN in the last 7 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388397#M113247</link>
      <description>&lt;P&gt;@bluecollar- Try below-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  |inputlookup vpn_users.csv | join type=outer user[|search index="gw_pfsense" authenticated | rex field=_raw "user \'(?&amp;lt;user&amp;gt;.*)\' auth" | dedup user|fields index  user]| where NOT index="gw_pfsense"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Apr 2019 15:17:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-build-a-query-that-shows-users-who-have-not/m-p/388397#M113247</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-04-12T15:17:11Z</dc:date>
    </item>
  </channel>
</rss>

