<?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: What is the most efficient way to search for unique hosts by a specific index? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181960#M52443</link>
    <description>&lt;P&gt;I was just about to post that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Here's the documentation on the metadata command for future reference @victorstarostenko&lt;/P&gt;

&lt;P&gt;Cheers!&lt;/P&gt;</description>
    <pubDate>Thu, 23 Oct 2014 18:31:53 GMT</pubDate>
    <dc:creator>ppablo</dc:creator>
    <dc:date>2014-10-23T18:31:53Z</dc:date>
    <item>
      <title>What is the most efficient way to search for unique hosts by a specific index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181958#M52441</link>
      <description>&lt;P&gt;I need to find unique hosts consumed by a specific index. &lt;BR /&gt;
I use the following search string:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index
|stats values(host)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As I understand, 'values' returns unique values for 'host'. This gives me what I need, but takes a &lt;STRONG&gt;loooooong&lt;/STRONG&gt; time (3+ hours). &lt;BR /&gt;
Is there a better way?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2014 18:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181958#M52441</guid>
      <dc:creator>victorstarosten</dc:creator>
      <dc:date>2014-10-23T18:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to search for unique hosts by a specific index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181959#M52442</link>
      <description>&lt;P&gt;Yes, there is a faaar better way;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts index=your_index_here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: and yes. The search actually starts with a pipe.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2014 18:29:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181959#M52442</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-10-23T18:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to search for unique hosts by a specific index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181960#M52443</link>
      <description>&lt;P&gt;I was just about to post that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Here's the documentation on the metadata command for future reference @victorstarostenko&lt;/P&gt;

&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2014 18:31:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181960#M52443</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2014-10-23T18:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to search for unique hosts by a specific index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181961#M52444</link>
      <description>&lt;P&gt;Perfect.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2014 18:37:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181961#M52444</guid>
      <dc:creator>victorstarosten</dc:creator>
      <dc:date>2014-10-23T18:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to search for unique hosts by a specific index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181962#M52445</link>
      <description>&lt;P&gt;&lt;CODE&gt;metadata&lt;/CODE&gt; is the way to go here, but if your &lt;CODE&gt;stats&lt;/CODE&gt; requirements on indexed fields become more complex you should take a look at &lt;CODE&gt;tstats&lt;/CODE&gt;: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/tstats"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/tstats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=* by index sourcetype host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Will give you a blazingly fast summary of what your Splunk data looks like in those three dimensions.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2014 22:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-search-for-unique-hosts-by-a/m-p/181962#M52445</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-23T22:42:07Z</dc:date>
    </item>
  </channel>
</rss>

