<?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: Host Metrics with associated indexes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661255#M228294</link>
    <description>&lt;P&gt;That sounds about right, although I would expect each index to be on a separate line with the corresponding index name.&amp;nbsp; Do you have a screenshot?&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 18:34:13 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-10-18T18:34:13Z</dc:date>
    <item>
      <title>Host Metrics with associated indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661219#M228284</link>
      <description>&lt;P&gt;We're using this query to retrieve metrics on our hosts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal source=*metrics.log group=tcpin_connections 
| eval sourceHost=if(isnull(hostname), sourceHost,hostname) 
| rename connectionType as connectType
| eval connectType=case(fwdType=="uf","univ fwder", fwdType=="lwf", "lightwt fwder",fwdType=="full", "heavy fwder", connectType=="cooked" or connectType=="cookedSSL","Splunk fwder", connectType=="raw" or connectType=="rawSSL","legacy fwder")
| eval version=if(isnull(version),"pre 4.2",version)
| rename version as Ver
| dedup sourceIp
| table connectType, sourceIp, sourceHost, Ver&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives us everything we need, except for what indexes these hosts are sending data to.&lt;BR /&gt;&lt;BR /&gt;I'm aware of this query to retrieve the indexes and the hosts that are sending data to them:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|tstats values(host) where index=* by index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I combine the two, either with a join or a sub search where in the table output, we have a column for index, which would give us a list of indexes the hosts are sending to?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 15:21:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661219#M228284</guid>
      <dc:creator>WebNerdNick</dc:creator>
      <dc:date>2023-10-18T15:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Host Metrics with associated indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661232#M228285</link>
      <description>&lt;P&gt;This should do it.&amp;nbsp; It just runs both queries and uses the &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command to regroup the results.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal source=*metrics.log group=tcpin_connections 
| eval sourceHost=if(isnull(hostname), sourceHost,hostname) 
| rename connectionType as connectType
| eval connectType=case(fwdType=="uf","univ fwder", fwdType=="lwf", "lightwt fwder",fwdType=="full", "heavy fwder", connectType=="cooked" or connectType=="cookedSSL","Splunk fwder", connectType=="raw" or connectType=="rawSSL","legacy fwder")
| eval version=if(isnull(version),"pre 4.2",version)
| rename version as Ver
| dedup sourceIp
| append [ | tstats values(host) as sourceHost where index=* by index | mvexpand sourceHost ]
| stats values(*) as * by sourceHost
| table connectType, sourceIp, sourceHost, Ver, index&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 16:38:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661232#M228285</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-18T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Host Metrics with associated indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661234#M228286</link>
      <description>&lt;P&gt;In my results under the index column, all I get is "_internal".&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 16:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661234#M228286</guid>
      <dc:creator>WebNerdNick</dc:creator>
      <dc:date>2023-10-18T16:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Host Metrics with associated indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661236#M228287</link>
      <description>&lt;P&gt;Interesting.&amp;nbsp; I see _internal and non-internal indexes when I run it on one of my sandboxes.&lt;/P&gt;&lt;P&gt;What do you see when you run the &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt; query alone?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 16:48:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661236#M228287</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-18T16:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Host Metrics with associated indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661248#M228290</link>
      <description>&lt;P&gt;tstats alone gives me an index column with proper index names (not _index), and then I have a values(host) column that has large listings of the hostnames that send to the related index.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 17:03:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661248#M228290</guid>
      <dc:creator>WebNerdNick</dc:creator>
      <dc:date>2023-10-18T17:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Host Metrics with associated indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661255#M228294</link>
      <description>&lt;P&gt;That sounds about right, although I would expect each index to be on a separate line with the corresponding index name.&amp;nbsp; Do you have a screenshot?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 18:34:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/661255#M228294</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-18T18:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Host Metrics with associated indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/666053#M228498</link>
      <description>&lt;P&gt;I selected this answer as the solution. After coming back to this a few days later, it seems to be reporting what I was looking for. Not sure if there was some odd caching going on when I was testing over and over, but this at least gets me close to what I was looking for.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 18:20:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-Metrics-with-associated-indexes/m-p/666053#M228498</guid>
      <dc:creator>WebNerdNick</dc:creator>
      <dc:date>2023-10-24T18:20:23Z</dc:date>
    </item>
  </channel>
</rss>

