<?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 create a search to find the matching host in a index from the list of hosts ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/618003#M214792</link>
    <description>&lt;P&gt;if you can define hosts using a wildcard (as in your example hostA to hostZ):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;| metasearch index=IndexA host=host* | stats values(host) AS host &lt;/LI-CODE&gt;&lt;P&gt;if host* is to broad then you can restrict it with | where host IN or similar&lt;/P&gt;</description>
    <pubDate>Fri, 21 Oct 2022 16:04:21 GMT</pubDate>
    <dc:creator>PavelP</dc:creator>
    <dc:date>2022-10-21T16:04:21Z</dc:date>
    <item>
      <title>How to create a search to find the matching host in a index from the list of hosts ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/617966#M214772</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have a list of hosts/devices say from HostA to HostZ (PS: its not&amp;nbsp; a lookup file) I want to find out which host among the list show up in the particular index, say Index=IndexA.&lt;BR /&gt;&lt;BR /&gt;Could someone help me on this?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 11:45:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/617966#M214772</guid>
      <dc:creator>Woodpecker</dc:creator>
      <dc:date>2022-10-21T11:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search to find the matching host in a index from the list of hosts ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/617969#M214775</link>
      <description>&lt;P&gt;If the list of hosts is not a lookup file then in what form is it?&amp;nbsp; That will make a difference in the search.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 12:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/617969#M214775</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-21T12:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search to find the matching host in a index from the list of hosts ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/617971#M214776</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243242"&gt;@Woodpecker&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;putting the list of hosts in a lookup is the easiest way to solve your problem.&lt;/P&gt;&lt;P&gt;If you haven't a lookup and this list isn't so log, you could une the IN operator, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=indexA host IN (hostA, hostB, hostC ...,hostZ
| ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;even if the lookup is the best solution!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 12:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/617971#M214776</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-21T12:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search to find the matching host in a index from the list of hosts ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/618003#M214792</link>
      <description>&lt;P&gt;if you can define hosts using a wildcard (as in your example hostA to hostZ):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;| metasearch index=IndexA host=host* | stats values(host) AS host &lt;/LI-CODE&gt;&lt;P&gt;if host* is to broad then you can restrict it with | where host IN or similar&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 16:04:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-to-find-the-matching-host-in-a-index-from/m-p/618003#M214792</guid>
      <dc:creator>PavelP</dc:creator>
      <dc:date>2022-10-21T16:04:21Z</dc:date>
    </item>
  </channel>
</rss>

