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

How might I built a single widget or report or view that shows the volume of five different servers' C drives?

Jump to solution

I have five servers whose C drive space occasionally is used up.  I'd like to have a view in NPM that showed all five servers' C drive's status (in one view) by showing five pie graphics showing percentage of used space.  Or I could get by with a simple chart with percentage of each drive's space used or free.

I can do this manually with five different views in a new report using my old method here:  How to create a simple custom view of multiple interfaces' bandwidth utilization  by simply grabbing the Node ID for the volume view of each C drive (I think).

But I'd like to see if I can learn a new/better way.  How would you accomplish this task for five Windows servers monitored as nodes in NPM via WMI?  Or via some other method?

0 Kudos
1 Solution

This is how I would modify my standard disk volume dashboard to show 5 specific drives, just replace my 5 examples with your volumes' fullnames/

SELECT n.caption as [Node]

, v.Caption as [Volume]

, round(v.VolumePercentUsed,1) as [Space Used]

,round(v.volumespaceavailable/1073741824,1) as [Free GB]

,case when f.DaysToCapacityPeak is null then 'No Forecast'

when f.DaysToCapacityPeak<0 then 'Full'

when f.DaysToCapacityPeak<91 then tostring(f.DaysToCapacityPeak)

when f.DaysToCapacityPeak>90 then '>90 Days'

end as [Days til Full],

v.DetailsUrl as [_linkfor_Volume]

, n.DetailsUrl as [_linkfor_Node]

,'/Orion/images/StatusIcons/Small-' + n.StatusIcon AS [_IconFor_Node]

, case when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Error') then '/Orion/images/StatusIcons/Small-Critical.gif'

when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Warning') then '/Orion/images/StatusIcons/Small-Warning.gif'

when v.VolumePercentUsed>f.CriticalThreshold then '/Orion/images/StatusIcons/Small-Critical.gif'

when v.VolumePercentUsed>f.WarningThreshold then '/Orion/images/StatusIcons/Small-Warning.gif'

end as [_Iconfor_Space Used]

,'/Orion/images/StatusIcons/Small-' + v.StatusIcon AS [_IconFor_Volume]

from orion.Volumes v

join orion.nodes n on n.nodeid=v.nodeid

left join Orion.ForecastCapacitySettings fc on fc.InstanceId=v.VolumeID and fc.metricid=3

left join Orion.ForecastCapacity f on f.InstanceId = v.VolumeID and f.EntityType='Orion.volumes'

left join Orion.AlertSuppression asup on asup.entityuri = n.uri

where v.FullName in ('server1 - c:\','server2 - c:\','server3 - c:\','server4 - c:\''server5 - c:\')

order by currentvalue desc

- Marc Netterfield, Github

View solution in original post

0 Kudos
14 Replies

I used the exact syntax provided by mesverrum​ above, only substituting the actual name & label from my five Solarwinds pollers.  Once I started getting close to the proper poller/node/label name I discovered NPM offered a drop-down/selection for the exact poller/label I wanted for each poller's C drive. 

Without that, getting the server name and drive label correct was a tad confusing to me because some of these pollers share VM space on the same UCS chassis.  And the drive label name is based on the serial number of the physical drive.  That meant their drive labels all looked the same; the sole difference was the VM APE's name.

SELECT n.caption as [Node]

, v.Caption as [Volume]

, round(v.VolumePercentUsed,1) as [Space Used]

,round(v.volumespaceavailable/1073741824,1) as [Free GB]

,case when f.DaysToCapacityPeak is null then 'No Forecast'

when f.DaysToCapacityPeak<0 then 'Full'

when f.DaysToCapacityPeak<91 then tostring(f.DaysToCapacityPeak)

when f.DaysToCapacityPeak>90 then '>90 Days'

end as [Days til Full],

v.DetailsUrl as [_linkfor_Volume]

, n.DetailsUrl as [_linkfor_Node]

,'/Orion/images/StatusIcons/Small-' + n.StatusIcon AS [_IconFor_Node]

, case when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Error') then '/Orion/images/StatusIcons/Small-Critical.gif'

when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Warning') then '/Orion/images/StatusIcons/Small-Warning.gif'

when v.VolumePercentUsed>f.CriticalThreshold then '/Orion/images/StatusIcons/Small-Critical.gif'

when v.VolumePercentUsed>f.WarningThreshold then '/Orion/images/StatusIcons/Small-Warning.gif'

end as [_Iconfor_Space Used]

,'/Orion/images/StatusIcons/Small-' + v.StatusIcon AS [_IconFor_Volume]

from orion.Volumes v

join orion.nodes n on n.nodeid=v.nodeid

left join Orion.ForecastCapacitySettings fc on fc.InstanceId=v.VolumeID and fc.metricid=3

left join Orion.ForecastCapacity f on f.InstanceId = v.VolumeID and f.EntityType='Orion.volumes'

left join Orion.AlertSuppression asup on asup.entityuri = n.uri

where v.FullName in ('ServerName1-C:\ Label: LabelName1','ServerName2-C:\ Label: LabelName2','ServerName3-C:\ Label: LabelName3','ServerName4-C:\ Label: LabelName4','ServerName5-C:\ Label: LabelName5')

order by currentvalue desc

pastedImage_0.png

I like what you've got there.  However, I was able to accomplish the task using the script provided by mesverrum​; all it took was finally understanding the syntax and correctly matching it to that of the volumes that require monitoring.  The output looks like this:

pastedImage_0.png

Well done all,

Would you mind sharing the final syntax you used?

- David Smith
0 Kudos

Would also love the final version if possible

0 Kudos
Level 9

You could use some SWQL to to do this. For example, adding Top XX Volumes by Disk Space used and then in Filter Volumes something like VolumeDescription LIKE 'C:\%' AND SysName LIKE '%SOL%'

will produce the following.

SOL.PNG

However, I haven't tested adding multiple AND statements if your servers don't have a naming pattern you can match on.

That's an idea I hadn't thought of.

Ideally the solution would always show only five specific hard drives' free/used disk space.

I'm still looking for a response that ends up with that as the final output.  It would be nice to have build it so it can show up as a dedicated window in NPM's front page.

0 Kudos

This is how I would modify my standard disk volume dashboard to show 5 specific drives, just replace my 5 examples with your volumes' fullnames/

SELECT n.caption as [Node]

, v.Caption as [Volume]

, round(v.VolumePercentUsed,1) as [Space Used]

,round(v.volumespaceavailable/1073741824,1) as [Free GB]

,case when f.DaysToCapacityPeak is null then 'No Forecast'

when f.DaysToCapacityPeak<0 then 'Full'

when f.DaysToCapacityPeak<91 then tostring(f.DaysToCapacityPeak)

when f.DaysToCapacityPeak>90 then '>90 Days'

end as [Days til Full],

v.DetailsUrl as [_linkfor_Volume]

, n.DetailsUrl as [_linkfor_Node]

,'/Orion/images/StatusIcons/Small-' + n.StatusIcon AS [_IconFor_Node]

, case when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Error') then '/Orion/images/StatusIcons/Small-Critical.gif'

when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Warning') then '/Orion/images/StatusIcons/Small-Warning.gif'

when v.VolumePercentUsed>f.CriticalThreshold then '/Orion/images/StatusIcons/Small-Critical.gif'

when v.VolumePercentUsed>f.WarningThreshold then '/Orion/images/StatusIcons/Small-Warning.gif'

end as [_Iconfor_Space Used]

,'/Orion/images/StatusIcons/Small-' + v.StatusIcon AS [_IconFor_Volume]

from orion.Volumes v

join orion.nodes n on n.nodeid=v.nodeid

left join Orion.ForecastCapacitySettings fc on fc.InstanceId=v.VolumeID and fc.metricid=3

left join Orion.ForecastCapacity f on f.InstanceId = v.VolumeID and f.EntityType='Orion.volumes'

left join Orion.AlertSuppression asup on asup.entityuri = n.uri

where v.FullName in ('server1 - c:\','server2 - c:\','server3 - c:\','server4 - c:\''server5 - c:\')

order by currentvalue desc

- Marc Netterfield, Github

View solution in original post

0 Kudos

This looks very promising.

How does it handle the C drive being virtualized?  When I've created a test View of Volumes, limiting to only the C:\Labels I need, I find that the System Admins have tweaked these VM servers' drives somehow so I see much larger drives than are actually present.

They seem to be mounted in the same physical space, simply carved up as different volumes, which NPM doesn't see as separate.  Now I'm pondering the solution . . .

0 Kudos

I haven't come across any systems showing up the way you describe in any of my client's sites before, but to be honest during a consulting engagement I rarely go in and spot check drive sizes to validate that what orion tells me is the same as what I'd see in the server, I always just took it at face value.

- Marc Netterfield, Github
0 Kudos

Multiple SW APE's are on the same VM UCS platform.  Apparently they all share physical drive space that has the same Label / Serial number.  All of them show up as the same drive space in my custom queries. 

I'll need to find a way to isolate/separate them by server name.  I'm close, but not finding the right configuration or option yet.  The info is there for each drive.  It's just that several have the same C: Label based on serial number.

pastedImage_8.png

That's method 1, and it's not working. Method 2 is based on the query offered above.

When I add a Resource to the NPM home page, I:

  1. Choose Custom Query
  2. Preview the resource
  3. Edit the Custom Query and paste in the script (above)
  4. Edit the line:    ('server1 - c:\','server2 - c:\','server3 - c:\','server4 - c:\','server5 - c:\') so it has the server name, a dash, and c:\, all within the single quote. Example:  where v.FullName in ('Fred - c:\','Wilma - c:\','Barnie - c:\','Betty - c:\','Pebbles - c:\')
  5. Submit
  6. Reload
  7. No information is shown:\

pastedImage_7.png

Ignorance of the correct way to do this is a sad thing.

But I'm not giving up hope!

0 Kudos

I was asked to build a low space indicator element against a few specific drives for a customer dashboard, but they needed the thresholds based on GB free rather than percentage - and I couldn't find anything with nice RAG indicators (like the resource steshi uses in his example) in the existing resources.  Here's what I ended up with to address that, using status icons instead from the site images as the visual indicators, as I see mesverrum has done.  If you have a similar warning threshold for all your drives, you can set it statically in the CASE statement as I've done in this example.  In other instances, I've changed the CASE statement to evaluate against a node CP value that was used as a custom threshold (for CPU and MEMORY, actually) and altered the warning icon based on that to make it a little more dynamic.

pastedImage_1.png

select n.caption as [Server]

,n.DetailsURL as [_LinkFor_Server]

,'' as threshold,

CASE

when round((v.VolumeSpaceAvailable / 1073741824),0,1) < 250 Then '/Orion/images/StatusIcons/Small-Up-Critical.gif'

when round((v.VolumeSpaceAvailable / 1073741824),0,1) < 400 Then '/Orion/images/StatusIcons/Small-Up-Warn.gif'

else '/Orion/images/StatusIcons/Small-Up.gif'

END AS [_IconFor_threshold]

,v.DeviceID as [Volume]

,v.DetailsURL as [_LinkFor_Volume]

,round((v.VolumeSize / 1073741824),0,1) as [Disk Size (GB)]

,round((v.VolumeSpaceUsed / 1073741824),0,1) as [Used]

,round((v.VolumeSpaceAvailable / 1073741824),0,1) as [Free]

from Orion.Volumes v

join Orion.Nodes n

on n.NodeID = v.NodeID

where v.FullName in ('****M1030-G:\ Label:Data2 0678E677','****M1030-F:\ Label:ImageRight C01FA224','***P317-E:\ Label:DATA D48BABF2')

order by Free

If you went down the Table route as suggested by steshi you could then add a View Limitation on the Page? or would you want to view other node information on the same view?

- David Smith
0 Kudos

A limitation would work.  Actually, five limitations, I suspect.  Volume/Node name must include  "_______".

I was thinking in opposite terms--not filtering out all other volumes, but only looking at these five volumes.  The effect is the same, just different search parameters & logic.

0 Kudos

Add a Custom Property to the Node and Filter the Widget based on the CP and Volume Description

VolumeDescription LIKE 'C:\*' AND tez Like 'Yes'

Obviously, you would substitute my CP of Tez for your chosen CP and the Criteria I just quickly Added Yes into the field.

- David Smith
0 Kudos