This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Alert when used space changes by certain percentage?

There are a few older threads about this, but I didn't see any solutions. Nor did I see anything less than a couple years old.

Is there a way to alert when the used space of a volume changes by a certain amount/percentage? For example, I want to send an alert if the used space of a disk grows by more than 2GB over a 7 day period.

  • Not exactly as you describe but such a scenario the Capacity Forecasting alerts would indicate a looming issue prior to it impacting service, such as the default out-of-the-box 'Alert me when volume has less than 60 days of capacity left'.

  • I have been trying to turn this into an Alert as well, I was using percentages rather than a certain size. I have a SQL query another user helped with and I edited a bit that can tell for any drive using more than 50% of it's capacity if it grows by more than 10%.

    If you wanted I suppose you could change the date to -7 and PercentUsed to SpaceUsed and adjust accordingly.

    The trouble I'm having is how to convert my query into a working Custom SQL alert.

    Select

    Nodes.Caption

    ,Nodes.IP_Address

    ,Volumes.Caption

    ,Volumes.VolumePercentUsed

    ,vu.MaxPercentDiskUsed

    FROM Volumes

    JOIN Nodes ON Volumes.NodeID = Nodes.NodeID

    JOIN(

    SELECT

    NodeID

    ,VolumeID

    ,CONVERT(DateTime,Floor(Cast((DateTime) as Float)),101) AS SummaryDate

    ,MAX(PercentDiskUsed) AS MaxPercentDiskUsed

    FROM VolumeUsage

    WHERE

    DateTime BETWEEN dateadd(Day, -1, (Convert(Char,getdate(),101))) AND

    (Convert(Char,getdate(),101))

    GROUP BY NodeID,VolumeID,CONVERT(DateTime,Floor(Cast((DateTime) as Float)),101)

    ) vu ON Volumes.VolumeID = vu.VolumeID AND Nodes.NodeID = vu.NodeID

    Where

    Volumes.VolumePercentUsed > 1.1*(vu.MaxPercentDiskUsed) AND Volumes.VolumePercentUsed > 50

  • CDowning I was able to get this working based on a percentage.

    Setup Alert as Custom SQL

    pastedImage_0.png

    Use this as the alert query

    JOIN Nodes ON Volumes.NodeID = Nodes.NodeID

    JOIN(

    SELECT

    NodeID

    ,VolumeID

    ,CONVERT(DateTime,Floor(Cast((DateTime) as Float)),101) AS SummaryDate

    ,MAX(PercentDiskUsed) AS MaxPercentDiskUsed

    FROM VolumeUsage

    WHERE

    DateTime BETWEEN dateadd(Day, -1, (Convert(Char,getdate(),101))) AND

    (Convert(Char,getdate(),101))

    GROUP BY

    NodeID,VolumeID,CONVERT(DateTime,Floor(Cast((DateTime) as Float)),101)) vu ON Volumes.VolumeID = vu.VolumeID AND Nodes.NodeID = vu.NodeID

    Where

    Volumes.VolumePercentUsed > 1.1*(vu.MaxPercentDiskUsed)

    AND Volumes.VolumePercentUsed > 50

    This will alert on any drive over 50% full that has grown 10% over it's maximum percentage used of previous day.

    Below is what I used in the email alert to provide the current percent used and the previous days usage.

    The Volume below has grown by 10% since yesterday. 

    Node Name: ${N=SwisEntity;M=Node.Caption}

    Volume Name: ${N=SwisEntity;M=Caption}

    Volume Size:  ${N=SwisEntity;M=VolumeSize}

    Percent Available Now: ${N=SwisEntity;M=VolumePercentAvailable;F=OriginalValue} %

    Percent Available Yesterday: ${SQL: SELECT

    MaxPercentDiskUsed

    FROM Volumes

    JOIN Nodes ON Volumes.NodeID = Nodes.NodeID

    JOIN(

    SELECT

    NodeID

    ,VolumeID

    ,CONVERT(DateTime,Floor(Cast((DateTime) as Float)),101) AS SummaryDate

    ,MAX(PercentDiskUsed) AS MaxPercentDiskUsed

    FROM VolumeUsage

    WHERE

    DateTime BETWEEN dateadd(Day, -1, (Convert(Char,getdate(),101))) AND

    (Convert(Char,getdate(),101))

    GROUP BY

    NodeID,VolumeID,CONVERT(DateTime,Floor(Cast((DateTime) as Float)),101)) vu ON Volumes.VolumeID = vu.VolumeID AND Nodes.NodeID = vu.NodeID

    Where

    Volumes.VolumePercentUsed > 1.1*(vu.MaxPercentDiskUsed)

    AND Volumes.VolumePercentUsed > 50 AND Volumes.VolumeID = ${N=SwisEntity;M=VolumeID}

    } %