
Mike Rockwell (Progress Software) asked a question.
DriveSpace Threshold Via Attribute
Originally Entered by Paul Byers:
Allows a for an attribute to determine the threshold of any given volume. You will need to add an Attribute for each volume labeled "PzAlert-Volumelabel" (ex PzAlert-DriveC:\ or PzAlert-Drivedatastore1) The Volume Label.
You can now create a single alert in the Alert Center to trigger on any device on in the Dynamic group. Set the alarm level low (below any of your Thresholds) so you do not miss any Alerts.
- SELECT DISTINCT dbo.DeviceAttribute.nDeviceID
- FROM dbo.PivotStatisticalMonitorTypeToDevice INNER JOIN
- dbo.StatisticalDiskIdentification ON
- dbo.PivotStatisticalMonitorTypeToDevice.nPivotStatisticalMonitorTypeToDeviceID = dbo.StatisticalDiskIdentification.nPivotStatisticalMonitorTypeToDeviceID INNER JOIN
- dbo.DeviceAttribute ON dbo.PivotStatisticalMonitorTypeToDevice.nDeviceID = dbo.DeviceAttribute.nDeviceID AND
- dbo.StatisticalDiskIdentification.sDescription = RIGHT(dbo.DeviceAttribute.sName, LEN(dbo.StatisticalDiskIdentification.sDescription)) INNER JOIN
- dbo.StatisticalDiskCache ON dbo.StatisticalDiskIdentification.nStatisticalDiskIdentificationID = dbo.StatisticalDiskCache.nStatisticalDiskIdentificationID AND
- CAST(dbo.DeviceAttribute.sValue AS Float) < dbo.StatisticalDiskCache.nUsed_Max / dbo.StatisticalDiskCache.nSize * 100
- WHERE (dbo.DeviceAttribute.sName LIKE N'PzAlert-Drive%') AND (dbo.StatisticalDiskCache.nSize > 0)
Then create you Performance Disk threshold in Alert Center to ONLY include devices in this group, and set the level to the lowest value, or set it to 1% to get all drives on the device(s)
If you start getting errors like
"Dynamic Group Update: Error occurred running the SQL query and updating devices for device group: Name: PzAlert-DriveSpace, ID: 48, Message: Error converting data type nvarchar to float., Error: 8114"
Changing the "CAST" to TRY_CAST will fix it.
Here's the "new" code: