Dashboards & Visualizations

How To Query Disk Space Threshold with RangeMap

virabadrasana
Engager

Hi,

My Query Looks Like this:

index="disk" DriveName="*D*" | eval PercentSpaceUsed=((TotalSpaceKB - FreeSpaceKB) / TotalSpaceKB * 100) | eval DriveName=Name | timechart span=3m avg(PercentSpaceUsed) By DriveName | rangemap field=PercentSpaceUsed low=0-10 elevated=11-20 severe=21-100

But I don't get the ranges - I get just the time and the drive letter columns, with the PercentSpaceUsed in the value-cells for the drive.

My Dashboard looks like this, but this does not show the range:

<dashboard>
  <label>Disks</label>
  <row>
    <panel>
      <single>
        <search>
          <query>index="disk" DriveName="*D*" | eval PercentSpaceUsed=((TotalSpaceKB - FreeSpaceKB) / TotalSpaceKB * 100) | eval DriveName=Name | timechart span=3m avg(PercentSpaceUsed) By DriveName | rangemap field=PercentSpaceUsed low=0-10 elevated=11-20 severe=21-100</query>
          <earliest>rt-5m</earliest>
          <latest>rt</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="linkView">search</option>
        <option name="classField">range</option>
      </single>
    </panel>
  </row>
</dashboard>

My dashboard just shows the following:

2015-08-13T12:45:00.000+01:00

I want to create a single-value dashboard showing red if free space is less than 10%. Any ideas, please?

Thanks
Jean-Pierre

Tags (2)
0 Karma

virabadrasana
Engager

This is the correct query:

index="disk" DriveType="fixed" DriveName="*D*" | eval PercentSpaceUsed=((TotalSpaceKB - FreeSpaceKB) / TotalSpaceKB * 100) | eval DriveName=Name | rangemap field=PercentSpaceUsed low=0-10 elevated=11-89 severe=90-100 default=none
0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...