<?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: Using dbinspect, how to show space used as a percentage? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-dbinspect-how-to-show-space-used-as-a-percentage/m-p/133527#M7916</link>
    <description>&lt;P&gt;You will of course need either a figure of the available space or knowledge of the total size of the disk. When you have that, it's a simple thing such as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search_without_gauge | eval percent_used=TotalSizeOnDiskGB/(freeSpaceGB+TotalSizeOnDiskGB)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search_without_gauge | eval percent_used=TotalSizeOnDiskGB/totalDiskGB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From there you could output percent_used to a single value display.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2015 13:03:59 GMT</pubDate>
    <dc:creator>jeffland</dc:creator>
    <dc:date>2015-06-02T13:03:59Z</dc:date>
    <item>
      <title>Using dbinspect, how to show space used as a percentage?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-dbinspect-how-to-show-space-used-as-a-percentage/m-p/133526#M7915</link>
      <description>&lt;P&gt;I'm using a gauge in a dashboard which is showing space used by total size on disk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbinspect index=* OR index=_* | where splunk_server like("splunkindexername%")    | eval SizeOnDiskGB=sizeOnDiskMB/1024    | eval RawSizeGB=rawSize/1024/1024/1024    | stats sum(SizeOnDiskGB) AS TotalSizeOnDiskGB     | eval TotalSizeOnDiskGB=round(TotalSizeOnDiskGB, 0)   | gauge TotalSizeOnDiskGB 0 42000 51000 60000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to show percentage of space used instead..  Any ideas?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 12:41:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-dbinspect-how-to-show-space-used-as-a-percentage/m-p/133526#M7915</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-06-02T12:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using dbinspect, how to show space used as a percentage?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-dbinspect-how-to-show-space-used-as-a-percentage/m-p/133527#M7916</link>
      <description>&lt;P&gt;You will of course need either a figure of the available space or knowledge of the total size of the disk. When you have that, it's a simple thing such as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search_without_gauge | eval percent_used=TotalSizeOnDiskGB/(freeSpaceGB+TotalSizeOnDiskGB)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search_without_gauge | eval percent_used=TotalSizeOnDiskGB/totalDiskGB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From there you could output percent_used to a single value display.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 13:03:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-dbinspect-how-to-show-space-used-as-a-percentage/m-p/133527#M7916</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-06-02T13:03:59Z</dc:date>
    </item>
  </channel>
</rss>

