<?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: Find all assets in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/695015#M236357</link>
    <description>&lt;P&gt;You need to specify your needs more precisely. Finding sources of events is one thing, finding - for example - all hosts shown in firewall logs is a completely different cup of tea.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 18:18:05 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-08-01T18:18:05Z</dc:date>
    <item>
      <title>Find all assets in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694983#M236349</link>
      <description>&lt;P&gt;Hi, I am new to Splunk and would like to build a dashboard to find all hosts in environment. This should query all logs to pick up WSL environments, devices ingesting from my security tools and overall just anything with a hostname and classify it as domain joined, server or workstation.&lt;BR /&gt;&lt;BR /&gt;I am using this to then see the devices that has the forwarder installed and then would correlate to see what devices require the splunk forwarder.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="_internal" source="*metrics.log*" group=tcpin_connections
| dedup hostname
| table date_hour, date_minute, date_mday, date_month, date_year, hostname, sourceIp, fwdType ,guid ,version ,build ,os ,arch
| stats count&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Aug 2024 14:29:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694983#M236349</guid>
      <dc:creator>JandrevdM</dc:creator>
      <dc:date>2024-08-01T14:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Find all assets in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694986#M236350</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/270694"&gt;@JandrevdM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;with this search you can have only the list of Universal Forwarders and not the list of all devices.&lt;/P&gt;&lt;P&gt;In addition you could have a more performat search in this way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal BY host&lt;/LI-CODE&gt;&lt;P&gt;If you want also other devices, you must use a different filter in where condition, e.g.:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal OR index=* BY host&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 14:43:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694986#M236350</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-08-01T14:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Find all assets in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694991#M236352</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;Thanks!&lt;BR /&gt;&lt;BR /&gt;I also tried this but it takes ages to get results.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=*
| stats dc(computerName) as UniqueHostCount by computerName
| where UniqueHostCount &amp;gt; 0
| stats max(timestamp) by computerName
| table computerName&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Aug 2024 18:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694991#M236352</guid>
      <dc:creator>JandrevdM</dc:creator>
      <dc:date>2024-08-01T18:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find all assets in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694994#M236354</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/270694"&gt;@JandrevdM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;what's in my search doesn't match your requirement?&lt;/P&gt;&lt;P&gt;then, if you want the list of all your assets, you don't need all that commands, but only a list of hosts.&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&lt;SPAN&gt;UniqueHostCount is always 1 in your search.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;them you don't have timestamp from the first stats command, so you cannot use it in the second stats command because after a stats command you have only the fields in the stats.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;At least, using tstats you have a more performant search.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 15:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/694994#M236354</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-08-01T15:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find all assets in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/695015#M236357</link>
      <description>&lt;P&gt;You need to specify your needs more precisely. Finding sources of events is one thing, finding - for example - all hosts shown in firewall logs is a completely different cup of tea.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 18:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-all-assets-in-splunk/m-p/695015#M236357</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-08-01T18:18:05Z</dc:date>
    </item>
  </channel>
</rss>

