Installation and Usage of the DriveMonitor script.
Author: Wade Whitmoyer Reference Number: AA-00359 Views: 21114 Created: 05-28-2013 12:49 PM Last Updated: 05-29-2013 11:01 AM 0 Rating/ Voters

 View products to which this article applies.

Introduction

The DriveMonitor script polls the Windows Disk Manager of one or more computers to determine the amount of free space available on each of its fixed drives. In the event the available free space on a disk falls below the user-specified threshhold, an email notification is sent to to the specified address. The results of each polling cycle are inserted into an SQL database table specified by the user. This table must be in the Intelli-Site database for Intelli-Site to display it.  

The DriveMonitor.vbs file can be located anywhere on the machine.  We suggest a shortcut to it be placed in the startup folder for "All Users". The DriveMonitor script will have no visible window, but will show in the process list as wscript.exe

Procedure

Installation and Usage:

  • Create the log table:
    • Open Intelli-Site and enter Design mode.
    • Expand "Database"->"Cardlist".
    • Right click the "Tables" node and choose "Add Node and Edit"
    • In the resulting Window Enter "DriveMonitor" into the "New Table Name" field.
    • Click the "Add Field" button and enter the parameters for each field as follows:
      • Field Name: "Server" Type:"Text"
      • Field Name: "Drive" Type:"Text"
      • Field Name: "FreeSpace" Type:"Text"
      • Field Name: "TimeStamp" Type:"Date"
    • Click "OK"
  • Install and Configure the Script File:
    • Copy the vbs file to a location of your choice to which all users have write access. For simplicity, we will place the file in the Windows folder and use the %WINDIR% variable for the path.
    • Open the Windows Start Menu, right click the "Startup" folder and choose "Explore All Users".
    • In the resulting Explorer window, click the "File" menu and choose "New"->"Shortcut".
    • Follow the instructions on screen to create a shortcut for the DriveMonitor.vbs file.
    • Right click the resulting shortcut icon and choose "Properties".
    • Change the "Target:" field to the following:
      • Method 1:
        • "wscript %WINDIR%\DriveMonitor.vbs" and append the appropriate parameters as follows:
          • /emailFrom: Email account from which to send alert emails
          • /emailTo: Email address to send alert emails to
          • /emailPassword: Password for senders email account
          • /SMTPServer: Email server name
          • /SMTPPort: SMTP Port for sending emails
          • /SMTPUseSSL Connect to email server using SSL
          • /WaitTime: Amount of time in minutes between checking disk space
          • /SQLServer: SQL Server name for logging
          • /Database: Database name for logging results
          • /dbUser:         SQL username, if none specified, windows authentication will be used
          • /dbPassword: SQL password
          • /AlertHigh: Minimum percentage of disk space before warning email is sent expressed as decimal
          • /hosts: list of machines to monitor separated by commas, no spaces please
        • Apply your changes.
      • Method 2:
        • "wscript %WINDIR%\DriveMonitor.vbs /D"
        • Apply your changes.
        • Edit the DriveMonitor.vbs and set the default values to match your requirements.

Products

APPLIES TO
  • Intelli-Site Enterprise v.3.9
  • Intelli-Site Global v.3.9

Copyright © 2013 OSSI, LLC.  All rights 

reserved.

Intelli-Site® 

is registered in U.S. Patent & 

Trademark Office. 

All other registered and unregistered 

trademarks are the sole property of their 

respective owners.

goto Top

Attachments
DriveMonitor .vbs 10.1 Kb Download File
Quick Jump Menu