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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...