none
Getting low disk space alerts to email me

    Question

  • I have followed the steps in this MS article - http://support.microsoft.com/kb/324796 - for configuring alerts for low disk space and have googled and read other solutions in here, none which have worked for me trying it on 3 different Win 2003 servers on different networks.  My specific problem is that the though the alert triggers fine, it never seems to actually launch my batch file which is a simple command line emailer called SendEmail.  The batch file itself works 100 % of the time.  After googling and seeing others having the same problem, one person stated that he finally got it to work using only one command line argument, the "Single argument string".  That did not work for me.  I appeciate in advance any help I can get in here.  If need be, I can provide a link which will have screen shots, etc.  Thank you

    Dennis Parrish


    Dennis Parrish

    Tuesday, February 14, 2012 11:55 AM

Answers

  • Hi ,

    I have ever experienced this issue is due to the

    The user account in which the Performance logs and alerts service (Sysmonlog) was running did not have rights to trigger the Action specified under the alerts functionality though was able to record Perfmon logs.

    Set the user account used for the Performance logs and alerts service back to NT AUTHORITY\Network Service might fix the issue.  To do this,

    Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sysmonlog set the Object Name to be run under the “NT Authority\NetworkService”.

    After confirm this, please copy the bat file to %windir%\system32 folder. DO NOT use C:\1\emailalert.bat pattern. Just use "emailalert.bat".

    Thanks.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    • Edited by Aaron Hu -MSFT Friday, February 17, 2012 9:20 AM
    • Marked as answer by denparrish Friday, February 17, 2012 10:40 AM
    Friday, February 17, 2012 9:20 AM

All replies

  • Are you sure it's able to find your batch file and program to run it? The service account has to access the directory paths where the batch file and any executables it might use are.

    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Tuesday, February 14, 2012 12:22 PM
  • HI and thank you for replying!  The path is very simple c:\1\emailalert.bat and yes, the service account has full permissions.  See the following screen capture -

    http://denparrish.com/Alerts.JPG


    Dennis Parrish

    Tuesday, February 14, 2012 12:41 PM
  • Hi Dennis,

    Please note that % Free Space is the percentage of total usable space on the selected logical disk drive that was free. For alerts using % Free Space the values are going to be between 0 and 100.

    Try creating a new alert using the counter “Logical Disk\Free MegaBytes” and entering a value of 1000 or what you want. Also check is there any error related to this issue was generated on the application logs.

    How to create and configure performance alerts in Windows Server 2003
    http://support.microsoft.com/kb/324752


    Best Regards,
    Aiden


    Aiden Cao

    TechNet Community Support

    Wednesday, February 15, 2012 8:24 AM
    Moderator
  • Hi Aiden,

    The alert works fine - that is not my problem.  My problem is that it doesn not launch my batch file which would then send me an email.

    Here is a screen capture from the event log shoing that the Low Disk space alert has indeed tripped.

    http://denparrish.com/AppLog.JPG

    And here is the screen capture showing the path to my batch file.

    http://denparrish.com/Alerts.JPG

    There is nothing wrong with the batch file.  When launched manually, it works every time.

    There is no error in the application log indicating any problem accessing or launching the batch file, it just doesn't do it.  I have googled this issue and found other people having the same problem without it ever being solved.


    Dennis Parrish

    Wednesday, February 15, 2012 9:54 AM
  • Hi ,

    I have ever experienced this issue is due to the

    The user account in which the Performance logs and alerts service (Sysmonlog) was running did not have rights to trigger the Action specified under the alerts functionality though was able to record Perfmon logs.

    Set the user account used for the Performance logs and alerts service back to NT AUTHORITY\Network Service might fix the issue.  To do this,

    Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sysmonlog set the Object Name to be run under the “NT Authority\NetworkService”.

    After confirm this, please copy the bat file to %windir%\system32 folder. DO NOT use C:\1\emailalert.bat pattern. Just use "emailalert.bat".

    Thanks.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    • Edited by Aaron Hu -MSFT Friday, February 17, 2012 9:20 AM
    • Marked as answer by denparrish Friday, February 17, 2012 10:40 AM
    Friday, February 17, 2012 9:20 AM
  • BINGO !!  Thank you very much!!

    First, the registry setting was already correct so no change was necessary there.

    However, copying the emailalert.bat to the system32 directory along with the two files that it also needed to launch (sendemail.exe and sendemail.pl) allowed the batch file to finally launch successfully.

    That being said, in the messages above, there were the following two links from Microsoft referenced.

    1. http://support.microsoft.com/kb/324752

    2. http://support.microsoft.com/kb/324796

    If either of these articles mentioned that a batch file needed to be in the system32 directory, I would not have had to contact these support groups.  Those articles have not been updated since 2007 probably since it is Server 2003.  Hopefully, anyone else having this issue will find this post.  Thank you again sincerely!

    Dennis


    Dennis Parrish

    Friday, February 17, 2012 10:49 AM
  • Hi Dennis,

    You are welcome. I am glad to hear that the issue is resolved.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Monday, February 20, 2012 7:23 AM