<?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 How to get which User not logged into Splunk in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699886#M57391</link>
    <description>&lt;P&gt;I want to show which&amp;nbsp;User not logged into Splunk for last 30 or 90days in splunk&lt;/P&gt;
&lt;P&gt;For example: we have 300 user have access to splunk UI, I want to know who is not logged into splunk more than 7 days&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below query will show who has logged into splunk, but i wanted to show the who is not logged and last login time information.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=_audit sourcetype=audittrail action=success AND info=succeeded
| eval secondsSinceLastSeen=now()-_time
| eval timeSinceLastSeen=tostring(secondsSinceLastSeen, "duration")
| stats count BY user timeSinceLastSeen
| append
[| rest /services/authentication/users
| rename title as user
| eval count=0
| fields user ]
| stats sum(count) AS total BY user timeSinceLastSeen&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 28 Sep 2024 17:59:35 GMT</pubDate>
    <dc:creator>harishsplunk7</dc:creator>
    <dc:date>2024-09-28T17:59:35Z</dc:date>
    <item>
      <title>How to get which User not logged into Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699886#M57391</link>
      <description>&lt;P&gt;I want to show which&amp;nbsp;User not logged into Splunk for last 30 or 90days in splunk&lt;/P&gt;
&lt;P&gt;For example: we have 300 user have access to splunk UI, I want to know who is not logged into splunk more than 7 days&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below query will show who has logged into splunk, but i wanted to show the who is not logged and last login time information.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=_audit sourcetype=audittrail action=success AND info=succeeded
| eval secondsSinceLastSeen=now()-_time
| eval timeSinceLastSeen=tostring(secondsSinceLastSeen, "duration")
| stats count BY user timeSinceLastSeen
| append
[| rest /services/authentication/users
| rename title as user
| eval count=0
| fields user ]
| stats sum(count) AS total BY user timeSinceLastSeen&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 28 Sep 2024 17:59:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699886#M57391</guid>
      <dc:creator>harishsplunk7</dc:creator>
      <dc:date>2024-09-28T17:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get which User not logged into Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699887#M57392</link>
      <description>&lt;P&gt;Finding something that is not there is not Splunk's strong suit.&amp;nbsp; See this blog entry for a good write-up on it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.duanewaddle.com/proving-a-negative/" target="_blank" rel="noopener"&gt;https://www.duanewaddle.com/proving-a-negative/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this case, what you have just needs a little tweaking.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_audit sourcetype=audittrail action=success AND info=succeeded
| eval secondsSinceLastSeen=now()-_time
| stats count, min(secondsSinceLastSeen) as secondsSinceLastSeen BY user
| append
[| rest splunk_server=local /services/authentication/users
  | rename title as user
  | eval count=0
  | fields user count ]
| stats sum(count) AS total BY user
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 20:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699887#M57392</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-09-23T20:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get which User not logged into Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699888#M57393</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;| rest /services/authentication/users&lt;BR /&gt;| rename title as user&lt;BR /&gt;| table user realname roles email&lt;BR /&gt;| join type=left user &lt;BR /&gt;[search index=_audit sourcetype=audittrail action=success AND info=succeeded&lt;BR /&gt;| stats max(_time) as last_login_time by user&lt;BR /&gt;| where last_login_time &amp;gt; relative_time(now(), "-7d")&lt;BR /&gt;| table user last_login_time ]&lt;BR /&gt;| where isnull(last_login_time) OR last_login_time &amp;lt; relative_time(now(), "-7d")&lt;/PRE&gt;&lt;P&gt;------&lt;/P&gt;&lt;H5&gt;&lt;STRONG&gt;If you find this solution helpful, please consider accepting it and awarding karma points !!&lt;/STRONG&gt;&lt;/H5&gt;</description>
      <pubDate>Mon, 23 Sep 2024 20:38:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699888#M57393</guid>
      <dc:creator>Jawahir</dc:creator>
      <dc:date>2024-09-23T20:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get which User not logged into Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699949#M57397</link>
      <description>&lt;P&gt;thank you for your response, I have tried your query but not getting the user not logged in for last 7 days 30d or 90d. By selecting the time range it should automatically show the result which user not logged into splunk web UI.&amp;nbsp; For example we have 100 account in user list, only 10 users are actively login in, remaining user need to identify the when they last logged into splunk.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 13:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699949#M57397</guid>
      <dc:creator>harishsplunk7</dc:creator>
      <dc:date>2024-09-24T13:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get which User not logged into Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699950#M57398</link>
      <description>&lt;P&gt;thank you for your response, I have tried your query but not getting the user not logged in for last 7 days 30d or 90d. it showing total 0,i need to show by selecting the time range it should automatically show the result which user not logged into splunk web UI.&amp;nbsp; For example we have 100 account in user list, only 10 users are actively login in, remaining user need to identify the when they last logged into splunk.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:00:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/699950#M57398</guid>
      <dc:creator>harishsplunk7</dc:creator>
      <dc:date>2024-09-24T14:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get which User not logged into Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/700429#M57431</link>
      <description>Hi&lt;BR /&gt;I think that you need a separate lookup file, which contains all users, which have capability to login into splunk. If user hasn't ever logged in, then (depending how you have configured your users like splunk user, LDAP user, SSO users) it's quite probably that you haven't those names on your system. For that reason rest cannot return those to you.&lt;BR /&gt;&lt;BR /&gt;You need just replace that subquery [|rest....] on &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; 's answer with inputlookup query for those user accounts.&lt;BR /&gt;&lt;BR /&gt;r. Ismo</description>
      <pubDate>Sat, 28 Sep 2024 14:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/700429#M57431</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-09-28T14:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get which User not logged into Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/700443#M57432</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259591"&gt;@harishsplunk7&lt;/a&gt;&amp;nbsp;&amp;nbsp;I hope this search will help you ..&lt;/P&gt;&lt;PRE&gt;| rest /services/authentication/users splunk_server=local&lt;BR /&gt;| table title, realname, last_successful_login&lt;BR /&gt;| rename title AS username | addinfo&lt;BR /&gt;| eval status=if(last_successful_login&amp;gt;info_min_time,"User logged in during the selected time range","User Not logged in during the selected time range")&lt;BR /&gt;| convert ctime(*_login) ctime(*_time)|fields - *_time, info_sid&lt;/PRE&gt;&lt;P&gt;------&lt;/P&gt;&lt;H5&gt;If you find this solution helpful, please consider&lt;STRONG&gt; accepting it&lt;/STRONG&gt; and&lt;STRONG&gt; awarding karma points !!&lt;/STRONG&gt;&lt;/H5&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 19:15:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-which-User-not-logged-into-Splunk/m-p/700443#M57432</guid>
      <dc:creator>Jawahir</dc:creator>
      <dc:date>2024-09-28T19:15:53Z</dc:date>
    </item>
  </channel>
</rss>

