File transfer completion alert


In this page, learn how to configure real-time alerts on file transfer completion based on a set of rules.

For example, you may want to enable alerting to address one of these use cases:

  • When a file named invoice.txt from account A has been received.
  • When file named payments.txt is sent to a partner by FTP.
  • When a file transfer has ended with a permanent failure.

Once you've configured alerts, you must restart the OnFileTransferCompleted route in  Data Integration  >  Routes  >  in space   08-ST-Alerts  space for the modifications to apply.

Alerting rules 

Key principles

Prebuilt alerts on file transfer completion enables users to be notified when a file transfer has completed with a specific status.

The alerting criteria are specified in a decision table which checks whether the criteria are fulfilled and if yes, redirect to the recipient specified in the outcome. 

Decision tables are stored in flat files, whose location is specified in the FILETRANSFER_ALERT_DT  property in the 08-ST-Alerts space.

The content structure is composed of:

  • header – Consists of the attribute names of the file transfer, followed by <outcome>
  • The matching criteria values– Followed by the outcome value set with one or more email addresses and/or SNMP Trap.

Note

  • If you do not specify an absolute path for the file location, Decision Insight will search for the file in the var subfolder of the installation
  • To ignore an attribute, use the keyword <any>. For more information about t he matching expressions or keywords available , see the latest Axway Decision Insight documentation at Decision table.
  • The operator AND is applied on the condition attributes 
  • (warning) The ordering matters, because once there is a match for a file transfer, the subsequent rows are ignored

Decision table's structure

Column Name Description Possible values
status
Final status of the file transfer
  • SENDING
  • SENT
  • RECEIVING
  • RECEIVED
  • FAILED
  • CANCELED
  • TEMPORARY FAILED
  • PERMANENTLY FAILED
account This attribute represents the Account identifier available in your application.


businessUnit This attribute represents the Business Unit identifier available in your application.
protocol This attribute represents the Protocol identifier available in your application. Any protocol used by SecureTransport
fileName
This attribute represents the name of the transferred file.


transmittedBytes This attribute represents the number of bytes transferred during this file transfer. Numeric value, or value range [x..y]
sender

Depend on the situation, this attribute could represent the SecureTransport account name that’s doing the transfer, the sender server, etc...

For more information refer to SecureTransport documentation.


receiver

Depend on the situation, this attribute could represent the SecureTransport account that receives the file, the name of the server that receives the file, etc...

For more information, see the SecureTransport documentation.


<outcome>

Recipient(s) email address, comma separated
  and/or  to send a SNMP Trap, the string  SEND_SNMP_TRAP_FLAG

Email addresses, comma separated
String "SEND_SNMP_TRAP_FLAG"

Example of decision table

Send one or more Email alert for each rules and send an SNMP Trap alert for the first rule.

#status;account;businessUnit;protocol;fileName;transmittedBytes;sender;receiver;<outcome>

FAILED;<any>;<any>;HTTP;<any>;<any>;<any>;<any>;Anna Smith <"asmith@MyCompany.com">, John Doe<"jdoe@MyCompany.com"> SEND_SNMP_TRAP_FLAG

CANCELED;<any>;<any>;<any>;<any>;<any>;<any>;<any>;John Doe<"jdoe@MyCompany.com">, Anna Smith <"asmith@MyCompany.com">

RECEIVED;<any>;<any>;<any>;endsWith(xml);<any>;<any>;<any>; Anna Smith <"asmith@MyCompany.com">

RECEIVED;<any>;<any>;<any>;startsWith(ec);<any>;<any>;<any>; John Doe<"jdoe@MyCompany.com">

RECEIVED;<any>;<any>;<any>;matches(..Paul);<any>;<any>;<any>; Paul<"Paul@MyCompany.com">

RECEIVED;<any>;<any>;<any>;contains(marc);<any>;<any>;<any>; Marc<"Marc@MyCompany.com">



Note: In the example above, we use regular expression function to define file names. Use can use a regular expression in any field (Status, BusinessUnit, Protocol, etc...)

For example:

  • RECEIVED;<any>;<any>;<any>;endsWith(xml);<any>;<any>;<any>; Anna Smith <"asmith@MyCompany.com">This means each time we receive a file with the name ended with "xml" we will send a notification to Anna.


Because these alerts are sensitive to file transfer volume, they might heavily impact performance if not configured with caution.

To prevent these impacts and any potential notification flooding, it is highly recommended to configure the decision table to apply strong filtering criteria. Typically, you may want to notify users about FAILED or CANCELLED transfers, and then you'll apply this filter to the status. If you also want to enable alerting on successful completion, it is recommended to use additional criteria (such as the account, file name, protocol), to drastically reduce the number of alerts.

Email

Customize the email notification content

As for the routing logic, you can customize the body of notification messages using a template file. A template file is a text/html file where you can add the values of the file transfer attributes to enrich the notification. 

Indicate the location of the template file in the property FILETRANSFER_ALERT_EMAIL_TEMPLATE  (see table below). 

If you don't specify an absolute path for the file location, Decision Insight will search for the file in the " var" folder within Decision Insight's installation folder.


The following table lists the attributes you can use in your message template to enrich a notification message:

Attribute Description
$<body.fileTransferId>$

The transfer identifier

Example: 223f4f01-b490-49a2-acb5-12312d233d63-XFHRAZgoRTtGi14Ti1

$<body.status>$

The file transfer state.

Example: Received

$<body.account>$

The Secure Transport user account having triggered the file transfer.

Example: acme

$<body.businessUnit>$

The Business Unit of the Secure Transport user account having triggered the file transfer.

Example: Sales

$<body.fileName>$

The file name.

Example: orders.txt

$<body.transmittedBytes>$

Number of bytes transferred.

Example: 578000

$<body.sender>$

This field is not always fulfilled. When given, it corresponds to

  • The SecureTransport account name that’s doing the transfer.
  • The name of the server from where the file is transferred,
  • Etc
$<body.receiver>$

This field is not always fulfilled. When given, it corresponds to

  • The SecureTransport  Account that receives the file.
  • The name of the server receiving the file,
  • Etc
$<body.protocol>$

Protocol used.

Example: FTP


Examples of template files: 

Hello,
The transfer of the file "$<body.fileName>$" using the protocol "$<body.protocol>$" is completed with the status "$<body.status>$".
The total number of bytes transferred is $<body.transmittedBytes>$.
<html>
<body>
Hello,<br><br>
The following file transfer is completed with the status <strong>'$<body.status>$'</strong>:<br><br>
<table border="1">
<tr>
<th align="left"> Transfer Id </th>
<th align="left"> Status </th>
<th align="left"> Account </th>
<th align="left"> Business Unit </th>
<th align="left"> File Name </th>
<th align="left"> Transmitted Bytes </th>
<th align="left"> Sender </th>
<th align="left"> Receiver </th>
<th align="left"> Protocol </th>
</tr>
<tr>
<td align="right">$<body.fileTransferId>$</td>
<td align="right">$<body.status>$</td>
<td align="right">$<body.account>$</td>
<td align="right">$<body.businessUnit>$</td>
<td align="right">$<body.fileName>$</td>
<td align="right">$<body.transmittedBytes>$</td>
<td align="right">$<body.sender>$</td>
<td align="right">$<body.receiver>$</td>
<td align="right">$<body.protocol>$</td>
</tr>
</table>
</body>
</html>

Email account configuration

The punctuality alert is sent via email. To be able to send an alert, make sure you have an email account to use to send the email and for which you can specify the following information:  

  • Smtp server host
  • Loging
  • Password

SNMP Trap

Customize the SNMP Trap notification content

As for the email logic, you can customize the value of notification messages using a template file. A template file is an xml file where you can add OID (object id) and the values of the file transfer attributes to enrich the notification. 

If you need more information on SNMP xml message, see the SNMP component documentation.

Indicate the location of the template file in the property FILETRANSFER_ALERT_SNMP_TEMPLATE  (see table below). 

If you don't specify an absolute path for the file location, Decision Insight will search for the file in the " var " folder within Decision Insight's installation folder.


Like for email, the following table lists the attributes you can use in your message template to enrich a notification message:

Attribute Description
$<body.fileTransferId>$

The transfer identifier

Example: 223f4f01-b490-49a2-acb5-12312d233d63-XFHRAZgoRTtGi14Ti1

$<body.status>$

The file transfer state.

Example: Received
$<body.account>$

The Secure Transport user account having triggered the file transfer.

Example: acme
$<body.businessUnit>$

The Business Unit of the Secure Transport user account having triggered the file transfer.

Example: Sales

$<body.fileName>$

The file name.

Example: orders.txt

$<body.transmittedBytes>$

Number of bytes transferred.

Example: 578000

$<body.sender>$

This field is not always fulfilled. When given, it corresponds to

  • The SecureTransport account name that’s doing the transfer.
  • The name of the server from where the file is transferred,
  • Etc
$<body.receiver>$

This field is not always fulfilled. When given, it corresponds to

  • The SecureTransport account that receives the file.
  • The name of the server receiving the file,
  • Etc
$<body.protocol>$

Protocol used.

Example: FTP

Example

As an example, to send a single SNMP trap message of string type, we use the below template file.

This template example uses a single object identifier (OID).


<snmp version="1">
  <entry>
    <!-- All information in one OID -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.0</oid>
    <value type="String">Transfer Id :$<body.fileTransferId>$, Status :$<body.status>$, Account :$<body.account>$, Business Unit :$<body.businessUnit>$, File Name :$<body.fileName>$, Transmitted Bytes :$<body.transmittedBytes>$, Sender :$<body.sender>$, Receiver :$<body.receiver>$, Protocol :$<body.protocol>$</value>
  </entry>
  <entry>
    <!-- Transfer Id -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.1</oid>
    <value type="String">$<body.fileTransferId>$</value>
  </entry>
  <entry>
    <!-- Status -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.2</oid>
    <value type="String">$<body.status>$</value>
  </entry>
  <entry>
    <!-- Account -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.3</oid>
    <value type="String">$<body.account>$</value>
  </entry>
  <entry>
    <!-- Business Unit -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.4</oid>
    <value type="String">$<body.businessUnit>$</value>
  </entry>
  <entry>
    <!-- File Name -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.5</oid>
    <value type="String">$<body.fileName>$</value>
  </entry>
  <entry>
    <!-- Transmitted Bytes -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.6</oid>
    <value type="String">$<body.transmittedBytes>$</value>
  </entry>
  <entry>
    <!-- Sender -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.7</oid>
    <value type="String">$<body.sender>$</value>
  </entry>
  <entry>
    <!-- Receiver -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.8</oid>
    <value type="String">$<body.receiver>$</value>
  </entry>
  <entry>
    <!-- Protocol -->
    <oid>1.3.6.1.2.1.25.3.2.1.5.9</oid>
    <value type="String">$<body.protocol>$</value>
  </entry>
</snmp>

SNMP configuration

To send an alert sent via SNMP Trap version 2c, you need to specify the following information:

  • SNMP server host
  • SNMP server port

If you need to use an other SNMP protocol version, see the SNMP component documentation.

Snooze a notification

You may need to disable alert notifications for a specific period of time (e.g. maintenance operations), so as to avoid flooding users with irrelevant notifications.

A snooze mode is therefore available by setting the property SNOOZE to 'true' (cf. table below).

Alerting related properties

property description location default value
FILETRANSFER_ALERT_DT This is the routing logic configuration file path. Data Integration > Properties > In space 04-ST-Integration dtFileTransferAlert.txt
FILETRANSFER_ALERT_EMAIL_TEMPLATE This is the Email content configuration file path. Data Integration > Properties > In space 04-ST-Integration emailTemplateFileTransferAlert.txt
FILETRANSFER_ALERT_SNMP_TEMPLATE This is the SNMP Trap content configuration file path. Data Integration > Properties > In space 04-ST-Integration snmpTemplateFileTransferAlert.xml
SMTP_HOST Smtp server host Data Integration > Properties > In space 04-ST-Integration
SMTP_LOGIN Credential login Data Integration > Properties > In space 04-ST-Integration
SMTP_PASSWORD Credential password Data Integration > Properties > In space 04-ST-Integration
SNMP_HOST SNMP server host Data Integration > Properties > In space 04-ST-Integration
SNMP_PORT SNMP server port Data Integration > Properties > In space 04-ST-Integration 162
SNOOZE Boolean property to snooze the notification (snooze mode if 'true') Data Integration > Properties > In space 04-ST-Integration 'false'

#status;account;businessUnit;protocol;fileName;transmittedBytes;sender;receiver;<outcome>
FAILED;<any>;<any>;HTTP;<any>;<any>;<any>;<any>;Anna Smith <"asmith@MyCompany.com">, John Doe<"jdoe@MyCompany.com"> SEND_SNMP_TRAP_FLAG
CANCELED;<any>;<any>;<any>;<any>;<any>;<any>;<any>;John Doe<"jdoe@MyCompany.com">, Anna Smith <"asmith@MyCompany.com">
RECEIVED;<any>;<any>;<any>;endsWith(xml);<any>;<any>;<any>; Anna Smith <"asmith@MyCompany.com">
RECEIVED;<any>;<any>;<any>;startsWith(ec);<any>;<any>;<any>; John Doe<"jdoe@MyCompany.com">
RECEIVED;<any>;<any>;<any>;matches(..Paul);<any>;<any>;<any>; Paul<"Paul@MyCompany.com">
RECEIVED;<any>;<any>;<any>;contains(marc);<any>;<any>;<any>; Marc<"Marc@MyCompany.com">
###################################################################################################
# Do not forget to restart the route 'OnFileTransferCompleted' in the space '08-ST-Alerts'
# to let your modification become effective.
###################################################################################################

Related Links