Alert Via Email On Used Heap Threshold

Updated by Hari Prasad on

This custom function helps to get the available heap statistics during too many user uploads/downloads or during trigger execution. The real use of the function comes when the server responds slow. In order to get the available heap details need to use below two custom functions; Using these functions the available heap will be compared against a threshold defined heap.

a.GetUsedHeapInMb b.GetMaximumHeapInMb

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

Downloads

Source code and build instructions

How to alert via email on used heap threshold

Let me now show you how to implement that.

Before creating a custom trigger you need to have build installed in the server where JSCAPE MFT Server is running where the custom functions GetUsedHeapInMb and GetMaximumHeapInMb are available.

 

1. Create a trigger to get the statistics of available heap

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. 

 alert_via_email_on_heap_threshold

 

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

Consider an example that the server is too slow in responding, one of the reason for the slowness is much heap usage. In order to identify on what time the server is slow and when the heap usage is too high, the below mentioned expression can be used where the server checks for the available heap against a threshold defined for ever 30 minutes in a day.

(Minute=0 OR Minute=30) AND (Subtract(GetMaximumHeapInMb(),GetUsedHeapInMb()) < 300)

 

The above expression indicates to send an email when the available heap is less than 300 MB

 

alert_via_email_on_heap_threshold2 

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

 

is_server_key_valid_img4

 

On OK to add and input the required parameters.

 

is_server_key_valid_img5

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. 

Click Ok to save the settings.

That's it. Now you know how to use to send email on more heap usage.

Downloads

Download JSCAPE MFT Server

Topics: JSCAPE MFT, Functions

Get A Free Trial

Download Your 7-Day Free Trial Version of JSCAPE MFT Server.

Get Your Free Trial