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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...