4.6 DiskSpace

Use this Knowledge Script to monitor logical drives for the percentage of disk space used, the amount of free space in megabytes, and the percentage of disk growth between iterations.

Each time it runs, this script automatically monitors all logical disks on a server and all shared drives in a cluster. The owner of the quorum disk, which determines the current state of the cluster, monitors the space on shared drives. You can override automatic monitoring by providing a specific list of drives to monitor. Also, you can provide a list of drives to exclude from monitoring.

This script raises an event if the percentage of used space exceeds the threshold you set, if the amount of free space falls below the threshold you set, or if the percentage of disk growth exceeds the threshold you set.

NOTE:

  • In a cluster, this script runs on the primary node to monitor disk growth. If failover occurs, this script begins monitoring disk growth on the secondary node. The first iteration of the Knowledge Script job after failover reports the disk size of the secondary node as being the same as that of the primary node. The job begins reporting disk growth during the second and subsequent iterations after failover.

  • Because clustered virtual servers do not support maintenance mode, the Maintenance Mode option is unavailable for clustered virtual servers in AppManager.

The ReportAM_CurrentDiskSpaceUsage report uses data collected by the NT_DiskSpace script. Ensure you archive data detail when running the Knowledge Scripts to collect data. You must disable the Do not archive data detail option in the Advanced tab of the Knowledge Script properties dialog box to allow automatic data archiving.

To use the DiskSpace Knowledge Script, you must install the AppManager for Microsoft Windows module, version 7.6.x.0 or later, on your agent computers.

4.6.1 Resource Object

Logical disk object

4.6.2 Default Schedule

By default, this script runs every five minutes.

4.6.3 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

Event Notification

Event severity when job fails?

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the DiskSpace job fails. The default is 5.

Raise an event if threshold is crossed?

Select Yes to raise an event if the amount of available disk space falls below the threshold you set, if the percentage of disk utilization exceeds the threshold you set, and if the percentage of disk growth exceeds the threshold you set. The default is Yes.

When you enable this parameter, the script raises one event that details the disk usage for all monitored logical drives.

NOTE:If you run this script on a cluster, the script raises one event per monitored node in that cluster.

Raise a separate event for individual drives?

Select Yes to raise an event if the amount of available disk space falls below the threshold you set or the percentage of disk utilization exceeds the threshold you set. The default is unselected.

When you enable this parameter, the script raises separate events that detail the disk usage for each monitored logical drive.

Event severity when a threshold is crossed

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the amount of available disk space falls below the threshold you set or the percentage of disk utilization exceeds the threshold you set. The default is 5.

Do not raise events if disk growth thresholds are crossed?

Select Yes to limit the number of events that occur by not raising an event any time the disk growth thresholds are crossed. The default is unselected.

Only raise events when both disk space and disk utilization thresholds are crossed?

Select Yes to raise an event only when both disk space and disk utilization thresholds are crossed. The default is unselected.

Use XML format for event message?

Select Yes to format event detail messages in XML. Leave this parameter unselected to format event detail messages in plain text. Events formatted in XML display results in tables. Events in plain text display results in rows of unformatted text.

Disk Space Monitoring

Drives to monitor

To monitor network drives and override the automatic monitoring, provide the UNC paths to the logical drives you want to monitor. Separate more than one path with a comma, such as \\server01\C$,\\server02\D$

NOTE:The Log On As account under which the AppManager agent runs must have permission to access the UNC path.

Leave this parameter blank to automatically monitor all logical drives.

Drives to exclude

Provide a comma-separated list of the drives you do not want to monitor. This script automatically monitors all drives except those listed in this parameter. You can use regular expressions in this parameter. For more details about regular expressions, see the following Microsoft web pages:

You can also use the asterisk (*) as a wildcard at the end of a string.

Use volume label in Drives to exclude?

Select Yes to use volume label in the Drives to exclude.

The default is unselected.

HINT:To configure a drive (or volume) label, right-click the drive in Windows File Explorer, select Properties, then select the General tab. In the parameters for NT_DiskSpace, select the use volume label, then specify the drive label. This is in place of using the drive letter (e.g. “E:”)

Monitor mount points?

Select Yes to allow the script to monitor mount points (mapped drives). The default is Yes.

Ignore disks with minimal total size?

Select Yes to exclude disks of a certain size from monitoring. Use the Threshold - Minimum disk size for monitoring parameter to set the minimum monitoring requirement. The default is Yes.

Minimum size for disk monitoring

Specify the minimum size requirement for disk monitoring. Disks of less than n MB are excluded from monitoring The default is 100 MB.

Thresholds

Global threshold - Minimum available disk space

Specify the minimum amount of disk space that must be available to prevent an event from being raised. The default is 100 MB.

This threshold applies to all disks unless you provide a per-disk threshold value in the Per-disk threshold - Minimum available disk space parameter.

Global threshold - Maximum disk utilization

Specify the maximum percentage of disk utilization that can occur before an event is raised. The default is 90%.

This threshold applies to all disks unless you provide a per-disk threshold value in the Per-disk threshold - Maximum disk utilization in % parameter.

Global threshold - Maximum percentage of disk growth

Specify the percentage of disk growth that can occur before an event is raised. The default is 25%.

For example, if you set this parameter to 30%, this script raises an event if the size of the disk is 30% larger than it was during the previous script iteration.

This threshold applies to all disks unless you provide a per-disk threshold value in the Per-disk threshold - Maximum percentage of disk growth in % parameter.

Apply per disk thresholds?

Select Yes to set different thresholds for individual disks. The default is unselected.

NOTE:If you are monitoring mount points, label them in the following manner:

C:\MOUNT=100000,D:\MOUNT=90000

Per-disk threshold - Minimum available disk space in MB

Specify the minimum amount of disk space that must be available on individual disks to prevent an event from being raised. Use commas to separate multiple thresholds. For example:

C=90500,D=550

In this example, the threshold for minimum disk space on the C: disk is 90500 MB. The threshold for the D: disk is 550 MB.

Per-disk threshold - Maximum disk utilization in %

Specify the maximum percentage of disk utilization that can occur on individual disks before an event is raised. Use commas to separate multiple thresholds. For example:

C=50,D=80

In this example, the threshold for maximum disk utilization on the C: disk is 50%. The threshold for the D: disk is 80%.

Per-disk threshold - Maximum percentage of disk growth in %

Specify the maximum percentage of disk growth that can occur on individual disks before an event is raised. Use commas to separate multiple thresholds. For example:

C=5,D=10

In this example, the threshold for maximum disk growth on the C: disk is 5%. The threshold for the D: disk is 10%.

Data Collection

Collect data for available disk space?

Select Yes to collect data for charts and reports. If enabled, data collection returns the amount of available disk space for the selected drives. The default is unselected.

Collect data for disk utilization?

Select Yes to collect data for charts and reports. If enabled, data collection returns utilization details for logical disk space (%), used space (%), threshold (%), total space (MB), free space (MB). The default is unselected.

Collect data for disk growth?

Select Yes to collect data for charts and reports. If enabled, data collection returns the percentage of disk growth from the previous iteration to the current iteration. The default is unselected.