<?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: Search for inactive users in my application in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178745#M51422</link>
    <description>&lt;P&gt;Ah.. then you might not need a lookup. If you have the users setup right in splunk something like below might work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action="login attempt" info="succeeded" earliest=-7d@d latest=-3d@d NOT [search index=_audit action="login attempt" info="succeeded" earliest=-3d@d | dedup user | fields user ]|join user [| rest /services/authentication/users splunk_server=local| search defaultApp=yourapp_here|fields title defaultApp|rename title as user ]|fields user defaultApp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this should give you the users who have not logged in for past 3 days out of all users who have logged in in the past 7 days... you change the time period to fit your requirements.&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2015 17:02:41 GMT</pubDate>
    <dc:creator>Yasaswy</dc:creator>
    <dc:date>2015-05-04T17:02:41Z</dc:date>
    <item>
      <title>Search for inactive users in my application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178742#M51419</link>
      <description>&lt;P&gt;I am using Splunk to monitor my application and would like to know what users have been inactive of the last X days.&lt;/P&gt;

&lt;P&gt;I have a user lookup with userId and username. I think I can accomplish this search using "inputlookup myuserlookup | search NOT", but I got stuck.&lt;/P&gt;

&lt;P&gt;I would really appreciate any advice figuring out the syntax. (I'm still a noob at this.)&lt;/P&gt;

&lt;P&gt;To clarify, I am interested in users of my application, not of the Splunk application. The entire list of users are in the lookup file I have uploaded.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2015 16:59:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178742#M51419</guid>
      <dc:creator>will_paxata</dc:creator>
      <dc:date>2015-05-01T16:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search for inactive users in my application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178743#M51420</link>
      <description>&lt;P&gt;Hi.. user activity will be available in audit. One way to do what you want would be to &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;List all users who have logged in in your interested time period&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Dedup"&gt;Dedup&lt;/A&gt; them with the users who have actually logged in (this will eliminate the all users who have logged in)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Logged in users will be available in audit entries. Assuming you named you field as users in your lookuptable. Something in the line of below might help (for eg past 3 Days)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit earliest=-3d@d latest=@d action="login attempt" info=succeeded|stats values(user) as user|fields user|inputlookup append=t myuserlookup | dedup user 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Dedup"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Dedup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2015 19:46:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178743#M51420</guid>
      <dc:creator>Yasaswy</dc:creator>
      <dc:date>2015-05-01T19:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search for inactive users in my application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178744#M51421</link>
      <description>&lt;P&gt;To clarify, I am interested in users of my application, not of the Splunk application. The entire list of users are in the lookup file I have uploaded.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2015 22:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178744#M51421</guid>
      <dc:creator>will_paxata</dc:creator>
      <dc:date>2015-05-01T22:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Search for inactive users in my application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178745#M51422</link>
      <description>&lt;P&gt;Ah.. then you might not need a lookup. If you have the users setup right in splunk something like below might work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action="login attempt" info="succeeded" earliest=-7d@d latest=-3d@d NOT [search index=_audit action="login attempt" info="succeeded" earliest=-3d@d | dedup user | fields user ]|join user [| rest /services/authentication/users splunk_server=local| search defaultApp=yourapp_here|fields title defaultApp|rename title as user ]|fields user defaultApp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this should give you the users who have not logged in for past 3 days out of all users who have logged in in the past 7 days... you change the time period to fit your requirements.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2015 17:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178745#M51422</guid>
      <dc:creator>Yasaswy</dc:creator>
      <dc:date>2015-05-04T17:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Search for inactive users in my application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178746#M51423</link>
      <description>&lt;P&gt;The solution is to 1) create an intermediate file of ACTIVE users, then 2) do a lookup between the list of ALL users and ACTIVE USERS to get the INACTIVE users.&lt;/P&gt;

&lt;P&gt;0) Have a list of all users uploaded to Splunk called "all-users"&lt;/P&gt;

&lt;P&gt;1) Run this search to create the intermediate file named weekly_active_users.csv:&lt;BR /&gt;
* | stats dc(userid) as "loggedin" by userid | outputlookup weekly_active_users.csv&lt;/P&gt;

&lt;P&gt;2) Run this search to see the INACTIVE users:&lt;BR /&gt;
| inputlookup "all-users" | lookup weekly_active_users.csv userid as userid | where isnull(loggedin)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-inactive-users-in-my-application/m-p/178746#M51423</guid>
      <dc:creator>will_paxata</dc:creator>
      <dc:date>2020-09-28T19:57:13Z</dc:date>
    </item>
  </channel>
</rss>

