<?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 do I combine storage statistics of indexes with the index, sourcetype, and host? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-combine-storage-statistics-of-indexes-with-the-index/m-p/413664#M167799</link>
    <description>&lt;P&gt;I can use a rest search from the &lt;CODE&gt;services/data/indexes&lt;/CODE&gt;endpoint to calculate storage statistics, like the index size in GB, of each index. I would like to combine these storage statistics to a table that has the index, sourcetype, and host. Currently, I'm using this tstats search: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| tstats count where index=* by index sourcetype, host | stats list(host) as Hosts by index sourcetype| rename index as "Index", sourcetype as "Sourcetype(s)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I don't believe that &lt;CODE&gt;|rest&lt;/CODE&gt; and &lt;CODE&gt;|tstats&lt;/CODE&gt; can be used together. Is there a way I can do this only using &lt;CODE&gt;|tstats&lt;/CODE&gt;? Possibly by using license usage?&lt;/P&gt;

&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Aug 2018 21:02:01 GMT</pubDate>
    <dc:creator>alanzchan</dc:creator>
    <dc:date>2018-08-20T21:02:01Z</dc:date>
    <item>
      <title>How do I combine storage statistics of indexes with the index, sourcetype, and host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-combine-storage-statistics-of-indexes-with-the-index/m-p/413664#M167799</link>
      <description>&lt;P&gt;I can use a rest search from the &lt;CODE&gt;services/data/indexes&lt;/CODE&gt;endpoint to calculate storage statistics, like the index size in GB, of each index. I would like to combine these storage statistics to a table that has the index, sourcetype, and host. Currently, I'm using this tstats search: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| tstats count where index=* by index sourcetype, host | stats list(host) as Hosts by index sourcetype| rename index as "Index", sourcetype as "Sourcetype(s)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I don't believe that &lt;CODE&gt;|rest&lt;/CODE&gt; and &lt;CODE&gt;|tstats&lt;/CODE&gt; can be used together. Is there a way I can do this only using &lt;CODE&gt;|tstats&lt;/CODE&gt;? Possibly by using license usage?&lt;/P&gt;

&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 21:02:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-combine-storage-statistics-of-indexes-with-the-index/m-p/413664#M167799</guid>
      <dc:creator>alanzchan</dc:creator>
      <dc:date>2018-08-20T21:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine storage statistics of indexes with the index, sourcetype, and host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-combine-storage-statistics-of-indexes-with-the-index/m-p/413665#M167800</link>
      <description>&lt;P&gt;why cant they used together?&lt;BR /&gt;
&lt;CODE&gt;| rest ... | stats ... keep index field ....&lt;BR /&gt;
    | append [ | tstats ....&lt;/CODE&gt;&lt;BR /&gt;
or you can use &lt;CODE&gt;| join&lt;/CODE&gt; for example&lt;BR /&gt;
i think you might like the &lt;CODE&gt;| dbisnpect&lt;/CODE&gt; command too, as you can calculate growth over time&lt;/P&gt;

&lt;P&gt;something like that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats values(sourcetype) as v_st values(host) as hosts where index=* by index
    | append [| rest /services/data/indexes | ... your statistics here ... by title
    | rename title as index]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 01:48:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-combine-storage-statistics-of-indexes-with-the-index/m-p/413665#M167800</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-08-21T01:48:42Z</dc:date>
    </item>
  </channel>
</rss>

