<?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: Pass dbinspect result to calculate index disk space in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202374#M2116</link>
    <description>&lt;P&gt;Thanks for your reply. however in my case I want to use dbinspect and use its output for sub search. dbinspect has to be a first statement in the search which I can not use as a subsearch. Some sample wrt my scenario will be of great help.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Apr 2016 05:18:49 GMT</pubDate>
    <dc:creator>shan_santosh</dc:creator>
    <dc:date>2016-04-15T05:18:49Z</dc:date>
    <item>
      <title>Pass dbinspect result to calculate index disk space</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202372#M2114</link>
      <description>&lt;P&gt;I this search below to calculate compression rate of my index&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbinspect index=myIndexName
| stats sum(rawSize) AS rawTotal, sum(sizeOnDiskMB) AS diskTotalinMB
| eval rawTotalinMB=(rawTotal / 1024 / 1024) | fields - rawTotal
| eval compression=round(diskTotalinMB / rawTotalinMB * 100, 2)
| table compression
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then I want to further use the compression value in below search in place of constant value .4&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics.log group=per_index_thruput series=myIndexName | eval MB = round
(kb/1024,2) * .4 | reverse | accum MB as totalvalue | timechart last(totalvalue) span=1d
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried subsearch and join, but no success. Can any one suggest a solution, hint?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 12:33:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202372#M2114</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-04-14T12:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Pass dbinspect result to calculate index disk space</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202373#M2115</link>
      <description>&lt;P&gt;Here's a generic example of how to pass a subsearch result into an eval:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | eval foo = exact(42 * [stats count as search | eval search = 0.1])
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should be translatable to your case, make sure to use the special field &lt;CODE&gt;search&lt;/CODE&gt; to avoid quotes being added.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 22:30:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202373#M2115</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-04-14T22:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pass dbinspect result to calculate index disk space</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202374#M2116</link>
      <description>&lt;P&gt;Thanks for your reply. however in my case I want to use dbinspect and use its output for sub search. dbinspect has to be a first statement in the search which I can not use as a subsearch. Some sample wrt my scenario will be of great help.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 05:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202374#M2116</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-04-15T05:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Pass dbinspect result to calculate index disk space</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202375#M2117</link>
      <description>&lt;P&gt;Works the same way, it's the first command of the subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | eval foo = exact(42 * [dbinspect index=main
  | stats sum(rawSize) AS rawTotal, sum(sizeOnDiskMB) AS diskTotalinMB
  | eval search=diskTotalinMB / rawTotal * 1024 * 1024 | fields search])
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Apr 2016 13:12:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202375#M2117</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-04-15T13:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Pass dbinspect result to calculate index disk space</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202376#M2118</link>
      <description>&lt;P&gt;This worked for me. Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 06:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Pass-dbinspect-result-to-calculate-index-disk-space/m-p/202376#M2118</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-04-18T06:18:06Z</dc:date>
    </item>
  </channel>
</rss>

