The below linked zip file and instructions will enable you to configure Memory, Disk, and CPU resource monitors on your Windows 2008 R2 server. Please note that these tools are only intended to provide another means to monitor your server, and that they should not be considered a replacement for server administration best practices. This package will install the following items:
- Performance Monitor Template titled “Performance Monitors”. The purpose of this item is to monitor the server resources (RAM, Disk, and CPU).
- Scheduled Task titled “Send Performance Monitors Email”. The purpose of this item is to send alert emails using C:\SendMail.exe when called by the “Performance Monitors” template.
- Scheduled Task titled “Start Performance Monitors”. The purpose of this item is to start or restart the “Performance Monitors” template after an error or a system reboot. This task requires an administrative username and password (gathered during installation).
To install the package, please follow the steps below:
- Download this file: PerfMonAndAlerts.zip
- Extract the contents of the file to the root of your system volume (typically C:\). This will place the required files into C:\SendMail. The folder C:\SendMail should have the following structure after extracting the files:
- Open a Powershell command prompt:
- Click Start
- Enter “Powershell” into the search box
- Select “Windows Powershell”
- In the Powershell command prompt, enter the “Set-ExecutionPolicy” command below. This will allow you to execute the Powershell script included in this article. The “Process” parameter ensures that the execution policy affects only the current Windows PowerShell process. For more information, please visit http://technet.microsoft.com/en-us/library/dd347628.aspx.
Set-ExecutionPolicy Unrestricted Process
- Change the working directory to the location of the extracted files:
- Execute the script that configures the performance monitors and tasks:
- You will be prompted for the following information (examples are provided in parenthesis):
- Enter the SMTP Server Name or IP (mail.mydomain.com)
- Enter the Recipient Email Address (email@example.com)
- Enter the From Email Address (firstname.lastname@example.org)
- Enter the Message Subject (Alert From VPS1234)
- Enter a Username with Administrative Rights (MyAdmin)
- Enter the Password For This User (MyPassword123)
- After the script completes the Task Scheduled and the Performance Monitor and Alerts applications will open for you to review and customize the items. By default, the performance monitors are configure with the following thresholds:
- Alert when Total Processor - % Idle Time < 10%
- Alert when Logical Disk C:\ - Free Megabytes < 2048
- Alert when Total Memory - Available Megabytes < 25
- Once you have finished customizing the alerts to meet your needs, you should enable and run the Scheduled Task that monitors and restarts the Performance Monitors
- In the Task Scheduler window, right click the “Start Performance Monitors” task and choose “Enable”.
- In the Task Scheduler window, right click the “Start Performance Monitors” task and choose “Run”.