Forum Discussion

Egis's avatar
Egis
Icon for Neophyte rankNeophyte
8 hours ago

Disks volume capacity alert thresholds based on volume size

Hi folks,

Does anyone have alerting thresholds set up based on disk volume capacity, or do you have an idea how to set it up? It could be good practice to have lower thresholds for larger data drives and higher thresholds for small drives.

For example, we need to set up warning alerts if space used is ≥98% for data drives larger than 1 TB and for every other drive, warning ≥90%.

I'm thinking about pulling the size of the disk as a property and using dynamic groups where I could set the threshold at the device group level; however, I'm not sure if this is the best approach.

Thanks!

4 Replies

  • It's been brought up a few times in the forums over the years. Your thought should work and might be the easiest but I personally would look to make a DataSource change to keep it a bit cleaner. I do see a Community DataSource called "WinVolumeUsageConditional-" that seems to implement something along these lines. Might be worth looking at or atleast using it for inspiration. Basically it uses Complex datapoints to provide more datapoints based on conditions that you can alert on.

    I personally don't like to hard code thresholds directly into the DataSource, so I would do something more like LargeDrivesFreeSpaceGB=if(gt(AvailableGB,1024),FreeSpaceGB,unkn()) and SmallDrivesFreeSpaceGB=if(le(AvailableGB,1024),FreeSpaceGB,unkn()) so you can set thresholds differently if the drive is small vs large. Note that I didn't test these and just off the top of my head.

    Also keep in mind that thresholds can be real numbers, so you can set thresholds to like >=98.1531%

  • I've been giving this some thought as well and was debating writing a new DS for it... since the real concern is making sure there's enough freespace on a disk... but we're tracking that using the inverse (Space Consumed rather than Space Free) and doing it with a percentage that doesn't scale correctly.  I was going to figure out how to produce a metric threshold that operates as a sliding value that would automatically produce a threshold based on both disk size and freespace that wasn't just a static number or a dynamic value based on normal usage... more of a consistent, predictable value.

    I don't have if figured out yet.

  • This is very close:

    $sizes    = @(128,256,512,1024)
    $expand   = 200
    $contract = 1000
    
    # X=log2(Y)
    
    foreach ( $size in $sizes) {
        $newPercent = 2000 / ($expand * [math]::Log($size,2) - $contract)
        write-host $size`t$newPercent
    }

     

  • Darnit... can't edit... From there, we twiddle the expand/contract values so that 1024 stays at 2 where it is, and 128 grows to 10 where we want it... then set a ceiling of 10 and use the resulting value to calculate the new threshold.

    That's the math... I just have to figure out how to apply it.