24h購物| | PChome| 登入
2012-07-02 09:48:30| 人氣3,118| 回應0 | 上一篇 | 下一篇

Server硬碟空間不足,警告通知設定

推薦 0 收藏 0 轉貼0 訂閱站台

Receive Low Disk Space Notifications via Email in Windows Server 2003

This article will assist you in configuring a performance monitor to notify you via email when disk space is below a specified threshold.

Enable SMTP Authentication

The first thing you need to do is ensure you have an SMTP server available for sending the notifications. The following support article walks you through configuring SmarterMail for allowing relay through localhost without any authentication.

Relay through SmarterMail on Localhost

Install and Configure Blat

Blat is a 3rd party utility we will install that performs the SMTP communication through the command line.

  1. Download Blat
  2. Click Open
  3. downloadblat262complete

  4. Unzip blat to c:\windows\system32
  5. unzipblat262

    extractblat262

  6. Open a command prompt, Start -> Run -> cmd
  7. startruncmd

  8. Change directory to blat installation, c:\windows\system32\blat262\full
  9. Configure blat to relay on localhost; blat -install localhost root@mydomain.com
      You can specify the from address here; ie root@mydomain.com
  10. configureblat262

Create a Batch Script to Send Email

  1. Open Notepad, Start > Run > notepad
  2. runnotepad

  3. Enter the following text; replace notifyaddress@yourdomain.com with the address you want to receive the notifications TO
      C:\WINDOWS\system32\blat262\full\blat.exe - -body "You are approaching your disk limit" -t notifyaddress@yourdomain.com -s "Disk Limit"
  4. Save As c:\windows\system32\emailblat.bat, be sure to Save as type: All Files
  5. saveasemailblatbat

Create the Performance Monitor Alert

  1. Start -> Administrative Tools -> Performance
  2. adminperformance

  3. Expand Performance Logs and Alerts
  4. Right Click on Alerts and select New Alert Settings
  5. newalertsettings

  6. Enter a name for the New Alert Setting, ie Free Disk Space
  7. newalertsettingsname

  8. Click OK
  9. Under comment enter a description for this alert
  10. freediskspacecountercomment

  11. Click Add
  12. Under Performance Object select Logical Disk
  13. Select % Free Space from the counters list
  14. Click Add
  15. Click Close
  16. addcounters

  17. Change Alert when the value is to Under and set the Limit to the numeric value where you wish to be notified, ie 500 would be 500Mb
  18. Change Sample Data every to the interval you wish to use for checking and receiving notifications
  19. valuelimit

  20. Select the Action Tab
  21. Check run this program
  22. Click Browse and navigate to the emailblat.bat you created in c:\windows\system32\
  23. runthisprogram

  24. Click Apply
  25. Set the user to run under, generally this will be your root user and password
  26. setpassword

  27. Click OK


參考來源

http://www.hosting.com/support/windows-server-2003/receive-low-disk-space-notifications-via-email-in-windows-server-2003

台長: 享利技術網
人氣(3,118) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類 | 個人分類: 技術 |
此分類下一篇:Dos中文字顯示設定
此分類上一篇:TCP連線狀態之意義

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文