<?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: Identifying stale computers on network in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575134#M200408</link>
    <description>&lt;P&gt;Assuming that&amp;nbsp;Computers.csv contains a field called "host" and&amp;nbsp;Dont_search.csv contains "user".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source=WinEventLog:Security 4624 EventCode=4624 [| inputlookup Computers.csv | table host] earliest=-1d@d
| fields host user
| lookup Dont_search.csv user OUTPUT user AS filtered_user
| search NOT filtered_user=*
| stats max(_time) AS last_logon_time first(user) AS user BY host
| eval days_since_logon=ROUND((now()-last_logon_time)/86400, 2)
| eval last_logon_date=strftime(last_logon_time, "%Y-%m-%d")
| table host user days_since_logon last_logon_date
| append [| inputlookup Computers.csv | table host]
| dedup host | fillnull value="-"
| table host user days_since_logon last_logon_date&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Includes domain field which should be more useful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source=WinEventLog:Security 4624 EventCode=4624 [| inputlookup Computers.csv | table host] earliest=-1d@d
| fields host user Account_Domain Security_ID
| lookup Dont_search.csv user OUTPUT user AS filtered_user | search NOT filtered_user=*
| eval domain=mvindex(Account_Domain, 1) | eval logon_id=mvindex(Security_ID, 1)
| search NOT domain="* *" | where host!=domain
| table _time host logon_id domain user
| stats max(_time) AS last_logon_time first(logon_id) AS logon_id first(domain) AS domain first(user) AS user BY host
| eval days_since_logon=ROUND((now()-last_logon_time)/86400, 2)
| eval last_logon_date=strftime(last_logon_time, "%Y-%m-%d")
| table host domain user logon_id days_since_logon last_logon_date
| append [| inputlookup Computers.csv | table host]
| dedup host
| table host domain user logon_id days_since_logon last_logon_date&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Nov 2021 20:13:43 GMT</pubDate>
    <dc:creator>johnhuang</dc:creator>
    <dc:date>2021-11-16T20:13:43Z</dc:date>
    <item>
      <title>Identifying stale computers on network</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575028#M200378</link>
      <description>&lt;P&gt;I am looking to identify specific assets that have not been logged into in over a set time. I am fairly new to all of this and trying to learn in a more hands on way. I was wondering what would be the best way to accomplish this?&lt;/P&gt;&lt;P&gt;I was thinking something like this but I don't think this is right:&lt;/P&gt;&lt;P&gt;EventCode=4624 AND [|inputlookup append=t Computers.csv] NOT [inputlookup append=t Dont_search.csv] | dedup host | table _time,host,user | sort host&lt;/P&gt;&lt;P&gt;Computers.csv - Specific computers that I want to track.&lt;/P&gt;&lt;P&gt;Dont_search.csv - Accounts that I DO NOT want to track.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hoping to show all computers on my list regardless of whether they were logged in too. Any help would be greatly appreciated!!!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 12:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575028#M200378</guid>
      <dc:creator>Durwood</dc:creator>
      <dc:date>2021-11-16T12:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying stale computers on network</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575050#M200381</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"&gt;https://www.duanewaddle.com/proving-a-negative/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 13:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575050#M200381</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-11-16T13:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying stale computers on network</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575057#M200383</link>
      <description>&lt;P&gt;There are two issues with your search.&lt;/P&gt;&lt;P&gt;1. Your subsearches must return properly named columns. Are you sure that you don't need to do some "| rename"?&lt;/P&gt;&lt;P&gt;2. With subsearches provided this way you only add further conditions to your search. You will still not get any results if there are no events matching the condition set.&lt;/P&gt;&lt;P&gt;If you want to find which hosts didn't send anything, you'd have to append "fake" results from a pre-defined set of hosts, and then - for example - sum them with your found events. Then you'd see which results have zero ocurrences.&lt;/P&gt;&lt;P&gt;A rough idea:&lt;/P&gt;&lt;PRE&gt;&amp;lt;your search&amp;gt; | stats count by Computername&lt;BR /&gt;| append [ | inputlookup myhosts.csv | eval count=0 ]&lt;BR /&gt;| stats sum(count) by Computername&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Nov 2021 14:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575057#M200383</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-16T14:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying stale computers on network</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575134#M200408</link>
      <description>&lt;P&gt;Assuming that&amp;nbsp;Computers.csv contains a field called "host" and&amp;nbsp;Dont_search.csv contains "user".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source=WinEventLog:Security 4624 EventCode=4624 [| inputlookup Computers.csv | table host] earliest=-1d@d
| fields host user
| lookup Dont_search.csv user OUTPUT user AS filtered_user
| search NOT filtered_user=*
| stats max(_time) AS last_logon_time first(user) AS user BY host
| eval days_since_logon=ROUND((now()-last_logon_time)/86400, 2)
| eval last_logon_date=strftime(last_logon_time, "%Y-%m-%d")
| table host user days_since_logon last_logon_date
| append [| inputlookup Computers.csv | table host]
| dedup host | fillnull value="-"
| table host user days_since_logon last_logon_date&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Includes domain field which should be more useful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source=WinEventLog:Security 4624 EventCode=4624 [| inputlookup Computers.csv | table host] earliest=-1d@d
| fields host user Account_Domain Security_ID
| lookup Dont_search.csv user OUTPUT user AS filtered_user | search NOT filtered_user=*
| eval domain=mvindex(Account_Domain, 1) | eval logon_id=mvindex(Security_ID, 1)
| search NOT domain="* *" | where host!=domain
| table _time host logon_id domain user
| stats max(_time) AS last_logon_time first(logon_id) AS logon_id first(domain) AS domain first(user) AS user BY host
| eval days_since_logon=ROUND((now()-last_logon_time)/86400, 2)
| eval last_logon_date=strftime(last_logon_time, "%Y-%m-%d")
| table host domain user logon_id days_since_logon last_logon_date
| append [| inputlookup Computers.csv | table host]
| dedup host
| table host domain user logon_id days_since_logon last_logon_date&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 20:13:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575134#M200408</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2021-11-16T20:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying stale computers on network</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575138#M200410</link>
      <description>&lt;P&gt;BTW, if your goal is to show real user logons to an interactive session, you should further filter the logon_type. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source=WinEventLog:Security 4624 (EventCode=4624 AND (Logon_Type=2 OR Logon_Type=7 OR Logon_Type=10 OR Logon_Type=11))
[| inputlookup Computers.csv | table host] earliest=-1d@d&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 20:20:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575138#M200410</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2021-11-16T20:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying stale computers on network</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575481#M200537</link>
      <description>&lt;P&gt;Thank you for the response! I am still having issues with the search excluding the users in the user column of my "Dont_Search.csv". Any ideas? I am very new to the Splunk game so apologies if I am asking something that is a bit elementary.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 16:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575481#M200537</guid>
      <dc:creator>Durwood</dc:creator>
      <dc:date>2021-11-18T16:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying stale computers on network</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575565#M200561</link>
      <description>&lt;P&gt;Could you provide a sample of the search output and also&amp;nbsp;&lt;SPAN&gt;Dont_Search.csv?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 23:02:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identifying-stale-computers-on-network/m-p/575565#M200561</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2021-11-18T23:02:02Z</dc:date>
    </item>
  </channel>
</rss>

