Skip to main content

Monitoring disk space with TimeXtender Orchestration and Data Quality


Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

In this article, you will read about monitoring disk space with TimeXtender Orchestration and Data Quality. You can monitor your server's filesystem with the PowerShell data provider. This article explains how to monitor disk space on your server and how to send an email when it falls below some specified threshold.

Monitor a single server

Steps

  1. Create a new Query in TimeXtender Data Quality by right-clicking the Tests folder 
  2. Select the PowerShell data provider 
  3. Add the following PowerShell script to the Query window:
    $computer_name = "machinename"
    
    $limit_gb = 20
    
    $limit_bytes = $limit_gb*1024*1024*1024
    
    $timeXtenderResult = Get-WmiObject Win32_LogicalDisk -ComputerName $computer_name -Filter 
    "DeviceID!='A:' and FreeSpace<$limit_bytes"   | Select-Object  @{Name="Computer";
    Expression={$computer_name}},DeviceID,@{Name="Size GB";Expression={$_.Size / 1GB}},
    @{Name="Free GB";Expression={$_.FreeSpace / 1GB}} | exMon-Out-DataTable
  4. Edit the two variables, specifying the server name and the free space limit.
  5. Below is a preview of the email notification you will receive if disk space falls below your specified threshold

Monitor multiple servers

To monitor multiple servers, you can use a PowerShell script with query parameters and Object Groups.

Steps

  1. Replace the previous code with:
    $computer_name = "{@computer_name[default:localhost][datatype:string][preview:localhost]}"
    
    $limit_gb = 20
    
    $limit_bytes = $limit_gb*1024*1024*1024
    
    $timeXtenderResult = Get-WmiObject Win32_LogicalDisk -ComputerName $computer_name -Filter 
    "DeviceID!='A:' and FreeSpace<$limit_bytes"   | Select-Object  @{Name="Computer";
    Expression={$computer_name}},DeviceID,@{Name="Size GB";Expression={$_.Size / 1GB}},
    @{Name="Free GB";Expression={$_.FreeSpace / 1GB}} | exMon-Out-DataTable
  2. Create an object group and add the query to the object group, once for each server to monitor:
  3. Add Extra Parameters to each query to specify which server to monitor:
    --@computer_name es-srv-01
    
  4. Here is an example when monitoring two servers.

     

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings