cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 11

Simple Volume Capacity Widget

As I continue to explore the possibilities with the new Modern Dashboard in 2020.2  I decided a visual view of Volume Capacity would work better than relying on the "60 days until volume is full" oob alert.

So I built this:

CapacityWidget.png

Sorted by percent used descending helps prioritize which drives need attention asap. 

Here's the Swql needed:

 

select node.nodename, 
       vfc.DetailsURL,
       vfc.DisplayName,
       vol.VolumePercentUsed
  from Orion.Nodes as node,
       Orion.Settings as s,
       Orion.VolumesForecastCapacity as vfc,
       Orion.Volumes as vol
       where node.Unmanaged = false 
         and node.NodeID = vfc.NodeID
         and s.SettingID = 'ForecastMinDays'
         and vfc.DaysToCapacityAvg <= 60
         and vfc.MetricName = 'Forecast.Metric.PercentDiskUsed'
         and DayDiff(vfc.MinDateTime, vfc.MaxDateTime) >= isnull(s.CurrentValue, 7)
         and vfc.DisplayName != 'Physical Memory'
         and vfc.DisplayName != 'Virtual Memory'
         and vfc.DisplayName LIKE '%:%'
         and vfc.Volume.VolumeID = vol.VolumeID
ORDER by vol.VolumePercentUsed DESC

 

 

The rest of the table widget settings are as follows:

volcapacity.png

You'll note that the SWQL explicitly filters out vmdk paths and other virtualization only showing lettered drives. Feel free to edit that portion or the Memory exclusions as well.  

Labels (4)
1 Reply
Level 11

Added new widgets to show:

a. Current health status of all volumes (really hope the chart widget eventually lets us add links to each item in the legend)

b. Volume Serial/Name Audit: Duplicate volume names (split causes between Orion's quirks when expanding a live VM volume you'll sometimes get a new drive showing up and the other cause is cloning old systems).

volscapmk2.png

That latter widget makes quick work of finding the volume serials that need fixed.

Without further ado the swql code for each is:

Overall Vols Health widget code:

select Status, sum(StatusCounter) as StatusCount from (select Status, 1 as StatusCounter from Orion.Volumes where DisplayName != 'Physical Memory' and DisplayName != 'Virtual Memory' and DisplayName like '%:\%') group by Status

Value Field: StatusCount

Category Field: Status 

Vols Audit

SELECT TOP 100 NodeID, Status, VolumeID, DisplayName, DetailsURL, Fullname FROM Orion.Volumes WHERE DisplayName != 'Physical Memory' AND DisplayName != 'Virtual Memory' AND DisplayName LIKE '%:\%' ORDER by Displayname

(We set for top 100 to minimize wait time but feel free to adjust to suit your needs)

Widget settings:

volsaudit.png