<?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 index for a given host in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537612#M90099</link>
    <description>&lt;P&gt;Thank you!&amp;nbsp; Exactly what I needed.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 13:29:01 GMT</pubDate>
    <dc:creator>jmo1</dc:creator>
    <dc:date>2021-01-28T13:29:01Z</dc:date>
    <item>
      <title>Find index for a given host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537427#M90072</link>
      <description>&lt;P&gt;I have a query to detect missing forwarders (hosts)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metadata type=hosts | eval age = now() - lastTime | search host=* | search age &amp;gt; 10 | sort age d | convert ctime(lastTime) | fields age,host,lastTime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works and, obviously, reveals the age, host, and last time they were seen.&amp;nbsp; I need to also include the index where the host is sending its data.&amp;nbsp; Since this query is using a metadata, that information doesn't appear to be available.&amp;nbsp; How can I modify this search to also include the actual index to which a host is reporting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 14:37:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537427#M90072</guid>
      <dc:creator>jmo1</dc:creator>
      <dc:date>2021-01-27T14:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Find index for a given host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537478#M90080</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228429"&gt;@jmo1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can use &lt;STRONG&gt;tstats&lt;/STRONG&gt; command to get host and index data.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index="*" by host, index 
| stats values(index) as indexes by host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metadata type=hosts 
| eval age = now() - lastTime 
| search host=* 
| search age &amp;gt; 10 
| sort age d 
| convert ctime(lastTime) 
| fields age,host,lastTime 
| appendcols 
    [| tstats count where index="*" by host, index 
    | stats values(index) as indexes by host]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If this reply helps you, an upvote/like would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:30:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537478#M90080</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-01-27T18:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find index for a given host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537612#M90099</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; Exactly what I needed.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 13:29:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537612#M90099</guid>
      <dc:creator>jmo1</dc:creator>
      <dc:date>2021-01-28T13:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Find index for a given host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537726#M90112</link>
      <description>&lt;P&gt;I am afraid that I spoke too soon.&amp;nbsp; I do get a list of indexes now, but the host doesn't align with the index.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="99.87096774193547%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="7.741935483870968%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="5.161290322580645%"&gt;1&lt;/TD&gt;&lt;TD width="7.612903225806451%"&gt;90619&lt;/TD&gt;&lt;TD width="57.03225806451613%"&gt;host.splunkcloud.com&lt;/TD&gt;&lt;TD width="22.322580645161292%"&gt;01/27/2021 15:00:00&lt;/TD&gt;&lt;TD width="7.741935483870968%"&gt;aa101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="5.161290322580645%"&gt;2&lt;/TD&gt;&lt;TD width="7.612903225806451%"&gt;85961&lt;/TD&gt;&lt;TD width="57.03225806451613%"&gt;SQL01&lt;/TD&gt;&lt;TD width="22.322580645161292%"&gt;01/27/2021 16:17:38&lt;/TD&gt;&lt;TD width="7.741935483870968%"&gt;aa101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="5.161290322580645%"&gt;3&lt;/TD&gt;&lt;TD width="7.612903225806451%"&gt;23253&lt;/TD&gt;&lt;TD width="57.03225806451613%"&gt;SQL01&lt;/TD&gt;&lt;TD width="22.322580645161292%"&gt;01/28/2021 09:42:46&lt;/TD&gt;&lt;TD width="7.741935483870968%"&gt;aa101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="5.161290322580645%"&gt;4&lt;/TD&gt;&lt;TD width="7.612903225806451%"&gt;527&lt;/TD&gt;&lt;TD width="57.03225806451613%"&gt;host.splunkcloud.com&lt;/TD&gt;&lt;TD width="22.322580645161292%"&gt;01/28/2021 16:01:32&lt;/TD&gt;&lt;TD width="7.741935483870968%"&gt;aa101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="5.161290322580645%"&gt;5&lt;/TD&gt;&lt;TD width="7.612903225806451%"&gt;255&lt;/TD&gt;&lt;TD width="57.03225806451613%"&gt;kf1&lt;/TD&gt;&lt;TD width="22.322580645161292%"&gt;01/28/2021 16:06:04&lt;/TD&gt;&lt;TD width="7.741935483870968%"&gt;aa101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="5.161290322580645%"&gt;6&lt;/TD&gt;&lt;TD width="7.612903225806451%"&gt;252&lt;/TD&gt;&lt;TD width="57.03225806451613%"&gt;PROXY01&lt;/TD&gt;&lt;TD width="22.322580645161292%"&gt;01/28/2021 16:06:07&lt;/TD&gt;&lt;TD width="7.741935483870968%"&gt;aa101&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The indexes that is returned is just a listing of the indexes in alphabetical order.&amp;nbsp; The index listed does not contain the host.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Can you verify that what you provided would match the host to the index containing the host?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537726#M90112</guid>
      <dc:creator>jmo1</dc:creator>
      <dc:date>2021-01-28T21:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Find index for a given host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537782#M90122</link>
      <description>&lt;P&gt;You can join the data instead.&amp;nbsp;&amp;nbsp;See if this works.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metadata type=hosts 
| eval age = now() - lastTime 
| search host=* 
| search age &amp;gt; 10 
| sort age d 
| convert ctime(lastTime) 
| fields age,host,lastTime 
| join type=left host 
    [| tstats count where index="*" by host, index 
    | stats values(index) as indexes by host]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 04:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537782#M90122</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-01-29T04:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Find index for a given host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537917#M90162</link>
      <description>&lt;P&gt;Thanks, that did it.&amp;nbsp; Much appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 20:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-index-for-a-given-host/m-p/537917#M90162</guid>
      <dc:creator>jmo1</dc:creator>
      <dc:date>2021-01-29T20:52:47Z</dc:date>
    </item>
  </channel>
</rss>

