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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...