Dashboards & Visualizations
Highlighted

How To Query Disk Space Threshold with RangeMap

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
Highlighted

Re: How To Query Disk Space Threshold with RangeMap

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