<?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: How to extract all hosts and their sourcetypes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-all-hosts-and-their-sourcetypes/m-p/39763#M9108</link>
    <description>&lt;P&gt;This is a slow way to list &lt;/P&gt;

&lt;P&gt;"* | top sourcetypes by host"&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;host, sourcetype, count, percent&lt;/P&gt;

&lt;P&gt;hostA, AAA, XXX, YY&lt;/P&gt;

&lt;HR /&gt;</description>
    <pubDate>Fri, 23 Dec 2011 03:59:00 GMT</pubDate>
    <dc:creator>rossikwan</dc:creator>
    <dc:date>2011-12-23T03:59:00Z</dc:date>
    <item>
      <title>How to extract all hosts and their sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-all-hosts-and-their-sourcetypes/m-p/39762#M9107</link>
      <description>&lt;P&gt;Trying to right a search that will extract and display all the hosts that have indexed data and their sourcetypes. Anyone have any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 00:55:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-all-hosts-and-their-sourcetypes/m-p/39762#M9107</guid>
      <dc:creator>sleathley</dc:creator>
      <dc:date>2011-12-23T00:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract all hosts and their sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-all-hosts-and-their-sourcetypes/m-p/39763#M9108</link>
      <description>&lt;P&gt;This is a slow way to list &lt;/P&gt;

&lt;P&gt;"* | top sourcetypes by host"&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;host, sourcetype, count, percent&lt;/P&gt;

&lt;P&gt;hostA, AAA, XXX, YY&lt;/P&gt;

&lt;HR /&gt;</description>
      <pubDate>Fri, 23 Dec 2011 03:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-all-hosts-and-their-sourcetypes/m-p/39763#M9108</guid>
      <dc:creator>rossikwan</dc:creator>
      <dc:date>2011-12-23T03:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract all hosts and their sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-all-hosts-and-their-sourcetypes/m-p/39764#M9109</link>
      <description>&lt;P&gt;How you write the search depends on what you want.  If you want to see how many events of each host/sourcetype combination, then you could use the following search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=* | fields host sourcetype | stats count by host sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The fields command will make it run faster, but it will still be pretty slow because: if you want to see ALL the hosts, you will have to run this search over "All time".&lt;/P&gt;

&lt;P&gt;In the Summary view of the Search app, you can see a list of hosts, sourcetypes and sources.  If you want a list like that, you can get it pretty quickly by using one of the following searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts

| metadata type=sourcetypes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Yes, these searches are weird, they &lt;STRONG&gt;DO&lt;/STRONG&gt; start with a pipe! You may want to use the table command to format the output.   What these searches &lt;STRONG&gt;won't&lt;/STRONG&gt; give you is "what are the sourcetypes that are associated with each host."  But if you want a simple list, these searches will be much faster.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 04:09:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-all-hosts-and-their-sourcetypes/m-p/39764#M9109</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2011-12-23T04:09:56Z</dc:date>
    </item>
  </channel>
</rss>

