<?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 How to create this search? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-this-search/m-p/630964#M108151</link>
    <description>&lt;P&gt;I need to create a search (or an embedded search that feeds data to another search.&amp;nbsp; What I'm trying to get is a search like&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;|tstats values(host) where index=* by index which might feed to a spread sheet that has server and host and then another search on top of it to match up host with index. (NOT indexers)&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE width="116"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="116" height="19"&gt;|tstats values(host) where index=* by index&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Wed, 15 Feb 2023 17:09:11 GMT</pubDate>
    <dc:creator>NanSplk01</dc:creator>
    <dc:date>2023-02-15T17:09:11Z</dc:date>
    <item>
      <title>How to create this search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-this-search/m-p/630964#M108151</link>
      <description>&lt;P&gt;I need to create a search (or an embedded search that feeds data to another search.&amp;nbsp; What I'm trying to get is a search like&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;|tstats values(host) where index=* by index which might feed to a spread sheet that has server and host and then another search on top of it to match up host with index. (NOT indexers)&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE width="116"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="116" height="19"&gt;|tstats values(host) where index=* by index&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 15 Feb 2023 17:09:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-this-search/m-p/630964#M108151</guid>
      <dc:creator>NanSplk01</dc:creator>
      <dc:date>2023-02-15T17:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-this-search/m-p/631348#M108214</link>
      <description>&lt;P&gt;Hello, so are you looking to output a table of host and index to show what hosts are in each index? If so, try this: &lt;STRONG&gt;&lt;EM&gt;|tstats count where index=* by host index|fields - count&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 15:37:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-this-search/m-p/631348#M108214</guid>
      <dc:creator>nyc_jason</dc:creator>
      <dc:date>2023-02-17T15:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-this-search/m-p/631406#M108220</link>
      <description>&lt;P&gt;Thank you, used part of this with a search, but had to get some assistance.&amp;nbsp; The final search looked a little like this--did not use two searches, just one:&lt;/P&gt;&lt;P&gt;index=_internal source=*metrics.log group=tcpin_connections&lt;BR /&gt;| eval sourceHost=lower(if(isnull(hostname), sourceHost,hostname))&lt;BR /&gt;| rename connectionType as connectType&lt;BR /&gt;| 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")&lt;BR /&gt;| eval version=if(isnull(version),"pre 4.2",version)&lt;BR /&gt;| join sourceHost&lt;BR /&gt;[|tstats values(host) where index=* NOT index=*** NOT index=***| rename values(host) as host&lt;BR /&gt;| mvexpand host&lt;BR /&gt;| dedup host index&lt;BR /&gt;| eval sourceHost= lower(host)&lt;BR /&gt;| fields - host]&lt;BR /&gt;| dedup sourceHost connectType version&lt;BR /&gt;| table sourceHost connectType version&lt;BR /&gt;| sort index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopes this helps anyone else who needs to combine information from two searches.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 19:53:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-this-search/m-p/631406#M108220</guid>
      <dc:creator>NanSplk01</dc:creator>
      <dc:date>2023-02-17T19:53:24Z</dc:date>
    </item>
  </channel>
</rss>

