April 10, 2012 at 8:19 am
Hi Guys
I am currently using SQL Alerts to monitor certain counters on my SQL Server
Does anyone know if there is a SQL Alert to monitor Drive Space?
I.E. When A certain drive reaches below a certain MB/GB amount, an alert is sent out.
Thanks
April 10, 2012 at 9:42 am
I use Policy Based Management with a WMI query (ExecuteWql).
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
April 11, 2012 at 12:02 am
opc.three (4/10/2012)
I use Policy Based Management with a WMI query (ExecuteWql).
Thanks
Can you explaing how that works?
Thanks
Derek
April 11, 2012 at 10:14 am
derekr 43208 (4/11/2012)
opc.three (4/10/2012)
I use Policy Based Management with a WMI query (ExecuteWql).Thanks
Can you explaing how that works?
Thanks
Derek
Sorry, I misspoke, I use PowerShell with a WMI query, not Policy Based Management. I started down the Policy Based Management road but left for PowerShell to gain a bit more flexibility.
I have a script run once per hour on all my instances to check on disk space and email if disk space is low. I cannot provide the entire script but here are the PowerShell/WMI-goods:
Get-WMIObject Win32_LogicalDisk -Filter "DriveType=3" -Computer $Computer | Select SystemName,DeviceID,@{Name="freespace(%)";Expression={"{0:N1}" -f(($_.freespace/$_.size)*100)}}
This gives me the free disk space for all drives on my server. From there I calculate the percent free on each relevant drive, compare it to the free-space-thresholds I have stored in a table and send an email if needed.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
April 11, 2012 at 10:58 am
opc.three (4/11/2012)
derekr 43208 (4/11/2012)
opc.three (4/10/2012)
I use Policy Based Management with a WMI query (ExecuteWql).Thanks
Can you explaing how that works?
Thanks
Derek
Sorry, I misspoke, I use PowerShell with a WMI query, not Policy Based Management. I started down the Policy Based Management road but left for PowerShell to gain a bit more flexibility.
I have a script run once per hour on all my instances to check on disk space and email if disk space is low. I cannot provide the entire script but here are the PowerShell/WMI-goods:
Get-WMIObject Win32_LogicalDisk -Filter "DriveType=3" -Computer $Computer | Select SystemName,DeviceID,@{Name="freespace(%)";Expression={"{0:N1}" -f(($_.freespace/$_.size)*100)}}
This gives me the free disk space for all drives on my server. From there I calculate the percent free on each relevant drive, compare it to the free-space-thresholds I have stored in a table and send an email if needed.
Thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply