Alert Via Email On Disk Usage Percentile Threshold

Posted by Hari Prasad on Nov 26, 2018 10:30:00 AM

This custom function is used to get the disk usage in percentile value. This function named GetDiskUsageInPercentile will be indeed helpful before the disk runs out of space. 

How to alert via email on disk usage percentile threshold

Let me now show you how to implement that.

Before creating a custom trigger you need to have build installed in the server. Refer the section below for more details.


Source code and build instructions

See How to Create Custom Trigger Functions for details on installation.


1. Create a trigger to get the statistics of disk usage

Login into admin console of JSCAPE MFT Server > Triggers and Click Add to create a Trigger

Give the trigger a Name and then select the  Current Time event type from the drop-down list. 




Click Next to Step 2 where a condition can be set to execute the trigger.

Consider an example that the disk where JSCAPE MFT Server runs has to be monitored every day at 9 PM and alert when it crosses defined threshold. In windows by default the server is installed in Disk "C", Hence the below expression indicates to monitor disk "C" at 9 PM and alert when the disk usage is greater than 80

Hour=21 AND (GetDiskUsageInPercentile("C:") > 80)



In Linux the function can be used as below; where /opt is the file system where JSCAPE Server is installed.

Hour=21 AND (GetDiskUsageInPercentile("/opt") > 80)


Once the condition is set Click Next to proceed

On Step 3 an action has to be added, in order to add an action click Add button and select the action "Send Email" from drop down list and Click OK




On OK to add and input the required parameters.



Enter all necessary parameters for sending that email notification, including the hostname of your SMTP server, the port number, connection type, etc. In the Body text box, enter the message you want to relay. 

In the Body text box , apart from the custom message we can add the function GetDiskUsageInPercentile() to print the value of the current disk usage so the recipients will aware of the status of the drive.

Click Ok to save the settings.

That's it. Now you know how to alert before the disk runs out of space using GetDiskUsageInPercentile function


Download JSCAPE MFT Server

Topics: JSCAPE MFT Server, Functions