Skip to main content

Agent Monitor Creation - Disk Workstations 5 GB

Summary

This script creates remote monitors for detected hard drives at the agent level and sets the script state to note that the SensorID already has a monitor assigned to it.

Time Saved by Automation: 5 Minutes

Sample Run

Sample Run

Dependencies

  • @WorkstationDiskThreshold - system properties.
  • @Agent Monitor Creation - Disk* - WRAPPER [Globals]

Variables

Variable NameDescription
intervalSets the internal, and as per ProVal standard, it is set to 300
MinMBytesFreeUsing system properties "WorkstationDiskThreshold" set for the monitor. In this case, it is 5000 MB
MinSizeMBThe minimum size of the drive should be at least 16 GB
reportcategoryThe report category for the alerts.
ticketcategoryThe ticket category will be set on the monitor so the tickets/alerts will go to the defined board
alerttemplateThe alert template will be set on the remote monitor.

System Properties

NameExampleRequiredDescription
WorkstationDiskThreshold5000TrueWorkstation Disk Threshold set for the monitor. In this case, it is 5000 MB

Script States

NameExampleDescription
MonitorIDDiskSpace-@sqldriveid@To note that the SensorID already has a monitor assigned to it

Process

This script runs some SQL commands to create monitors for detected hard drives at the agent level and sets the script state to note that the SensorID already has a monitor assigned to it.

ONLY 1 LINE SHOULD BE ENABLED BELOW.

  • Line 22 - If enabled, will only work for C drives.
  • Line 23 - If enabled, will work for ALL drives (Default)

Note: To adjust the thresholds, please modify line 7 to the desired MB free, adjust line 5 to match that (in GB), and line 18 to use the appropriate alert template for thorough disk cleanup.

The script runs as a subscript inside the "Agent Monitor Creation - Disk* - WRAPPER [Globals]" script.

Output

Creates Disk Space Remote Monitors on the internal drives of a workstation.