<?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: Run dbinspect as a scheduled job and make the result available to your SH in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Run-dbinspect-as-a-scheduled-job-and-make-the-result-available/m-p/152589#M185573</link>
    <description>&lt;P&gt;Schedule the following search to run on your indexer:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   | dbinspect index=index_name 
    | rex field=path "^/path_to_index/(?P&amp;lt;index&amp;gt;\w+_\w+[^/]+)"
    | fields state,id,rawSize,sizeOnDiskMB,index
    | stats sum(rawSize) AS rawTotal, sum(sizeOnDiskMB) AS diskTotalinMB by index
    | eval rawTotalinMB=(rawTotal / 1024 / 1024) | fields - rawTotal
    | eval compression_factor=tostring(round((rawTotalinMB-diskTotalinMB) / rawTotalinMB , 2)) 
    | table index,rawTotalinMB, diskTotalinMB, compression_factor 
    | summaryindex spool=t addtime=t index=summary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The summaryindex command writes the result to your summary index where you can fetch it from your SH.&lt;/P&gt;

&lt;P&gt;I haven't figured out how to get a single search to do this for all my indexes.  For now I set up a search for each index.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2014 05:15:27 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2014-02-17T05:15:27Z</dc:date>
    <item>
      <title>Run dbinspect as a scheduled job and make the result available to your SH</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-dbinspect-as-a-scheduled-job-and-make-the-result-available/m-p/152588#M185572</link>
      <description>&lt;P&gt;dbinspect has to be run on the indexer.  It can't be run from the search head.  How do I get the result from my search head?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2014 05:15:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-dbinspect-as-a-scheduled-job-and-make-the-result-available/m-p/152588#M185572</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2014-02-17T05:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Run dbinspect as a scheduled job and make the result available to your SH</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-dbinspect-as-a-scheduled-job-and-make-the-result-available/m-p/152589#M185573</link>
      <description>&lt;P&gt;Schedule the following search to run on your indexer:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   | dbinspect index=index_name 
    | rex field=path "^/path_to_index/(?P&amp;lt;index&amp;gt;\w+_\w+[^/]+)"
    | fields state,id,rawSize,sizeOnDiskMB,index
    | stats sum(rawSize) AS rawTotal, sum(sizeOnDiskMB) AS diskTotalinMB by index
    | eval rawTotalinMB=(rawTotal / 1024 / 1024) | fields - rawTotal
    | eval compression_factor=tostring(round((rawTotalinMB-diskTotalinMB) / rawTotalinMB , 2)) 
    | table index,rawTotalinMB, diskTotalinMB, compression_factor 
    | summaryindex spool=t addtime=t index=summary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The summaryindex command writes the result to your summary index where you can fetch it from your SH.&lt;/P&gt;

&lt;P&gt;I haven't figured out how to get a single search to do this for all my indexes.  For now I set up a search for each index.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2014 05:15:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-dbinspect-as-a-scheduled-job-and-make-the-result-available/m-p/152589#M185573</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2014-02-17T05:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run dbinspect as a scheduled job and make the result available to your SH</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-dbinspect-as-a-scheduled-job-and-make-the-result-available/m-p/152590#M185574</link>
      <description>&lt;P&gt;Have you looked at &lt;A href="http://apps.splunk.com/app/1632/"&gt;Fire Brigade&lt;/A&gt;? The &lt;A href="http://apps.splunk.com/app/1633/"&gt;TA&lt;/A&gt; includes inputs for dbinspect. You get a lot of information about your indexing and buckets from the app, and I highly recommend it. If you don't want the whole app, you could always pull apart the inputs.&lt;/P&gt;

&lt;P&gt;HTH,&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2014 06:27:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-dbinspect-as-a-scheduled-job-and-make-the-result-available/m-p/152590#M185574</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2014-02-17T06:27:31Z</dc:date>
    </item>
  </channel>
</rss>

