• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1229
  • Last Modified:

Email alert for disk usage?

I'd like to set up an alert to email me when my server's C, D, or E drive reach a certain threshold, is this possible and if so how?

I'm using Oputils software to monitor if from another server via SNMP. It shows usage but no way to email usage alerts.
3 Solutions
Windows performance monitor has Alert feature that you can use to send alert via email. You can set disk option with percent of free space.

server's version please
js479Author Commented:
Server 2003 SP1
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Exchange Server 2003
Exchange Management Pack Components
Health Monitoring and Performance Thresholds   The rules in this group include rules to monitor server health, such as rules for server configuration, security settings, and disk space thresholds, and mail queue thresholds. They also let you discover problems in key Exchange components by setting thresholds for alerts.
System Monitoring with Exchange Management Pack

did you mean on a exchange server?
js479Author Commented:
It's not an exchange server.  It hosts a SQL database.

I was able to set up an alert like lnkevin described, but I don't see how to make it email me. On the action tab of the alert I have it set to "Send a network message to:" me@mydomain.com but i think that may be trying to send a netsend message, not an email.
Where do i enable email?
Check out logmein.com "IT reach" will do it all part are for free
js479Author Commented:
lnkevin - could you enlighten me how to enable email for the alert you described?

JSoup - Thank you for the help, I'm still going to try to find a way to do it without logmein. I found a script that emails windows performance alerts but i'm having trouble with it. I'm hoping lnkevin will have some more info for me since I'm missing the email aspect of his post.
You need to schedule this script ex every hour, change mailfrom, subject ...
thats all
Bye Gastone Canali

Option Explicit

Public Sub MsgMail(Text)
      Dim objEmail
      Set objEmail = CreateObject("CDO.Message")
      objEmail.From = "MYMAIL@MyDomain.com"
      objEmail.To   = "MYMAIL@tMyDomain.com;STAFF@MyDomain.com"
      objEmail.Subject = "ALERT: 'low disk space' on " & ComputerName
      objEmail.Textbody = Text
    'If you dont have a local smtp configured: decomment next 3 lines and change the SMTPserver
      'objEmail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTPserver.MYdom.com"
      'objEmail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    Set objEmail = Nothing
End Sub

Public Function ComputerName()
    dim objNet
    Set objNet = CreateObject("WScript.NetWork")
      ComputerName =objNet.ComputerName
    Set objNet = Nothing
End Function

Public Function chkFreeSpace(HD,FSthreshold)
    Dim Free,Text,objWMIService, objLogicalDisk
    Set objWMIService = GetObject("winmgmts:")
    Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='" & HD &"'")
    Free = objLogicalDisk.FreeSpace / (1048576*1024) 'GB
    Text = "Free spase on disk " & HD & "  computer " & ComputerName _
         & " is " & CLng(Free) & " GB." & vbNewline  & "Date: " & Now()& vbNewline
    If Free < FSthreshold Then
    End If
    wscript.echo Text
     Set objWMIService  = Nothing
     Set objLogicalDisk = Nothing
End Function

' chkFreeSpace Disk , Free S space threshold in GB
chkFreeSpace "c:",100
chkFreeSpace "d:",200
chkFreeSpace "e:",500
js479Author Commented:
Thanks to all who contributed - I ended up using this solution - http://www.windowsitpro.com/WindowsScripting/Article/ArticleID/24594/24594.html

Points have been assigned for effort.
js479Author Commented:

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now