Submit a ticketCall us

Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.

 

Home > Success Center > Serv-U Managed File Transfer & Serv-U FTP Server > Serv-U File Server Administrator Guide > Domain overview > Domain events

Domain events

Created by Anthony.Rinaldi, last modified by Anthony.Rinaldi on Jul 20, 2016

Views: 11 Votes: 0 Revisions: 3

You can automatically create a list of the most common events. You can choose to create these common events using email or balloon tip actions. Click Create Common Event on the Events page. Select the Send Email or Show balloon tip option for the action you want to perform on the common events. If you choose to send email, enter an email address.

The Write to Windows Event Log and Write to Microsoft Message Queue (MSMQ) options are available for Windows only.

Event actions

You can select from the following actions that are executed when an event is triggered:

  • Send Email
  • Show Balloon Tip*
  • Execute Command*
  • Write to Windows Event Log (Windows only)*
  • Write to Microsoft Message Queue (MSMQ) (Windows only)*

    Events involving anything other than email can only be configured by <variable name="MyVariables.ProductNameShort"> server administrators.</variable>

Email actions

You can configure email actions to send emails to multiple recipients and to <variable name="MyVariables.ProductNameShort"> groups when an event is triggered. </variable>

To add an email address, enter it in the To or Bcc fields. To send emails to a <variable name="MyVariables.ProductNameShort"> group, use the Group icon to add or remove <variable name="MyVariables.ProductNameShort"> groups from the distribution list. Separate email addresses by commas or semicolons. Email actions contain a To, Subject and Message parameter. You can use special variables to send specific data pertaining to the event. For more information about the variables, see <xref class="ParaTextOnly" href="Help-System-Variables.htm">System variables</xref>.</variable></variable>

To use email actions, you must first <xref class="ParaTextOnly" href="Help-SMTP.htm">configure SMTP settings</xref>.

Balloon tip actions

You can configure a balloon tip to show in the system tray when an event is triggered. Balloon tip actions contain a Balloon Title and a Balloon Message parameter. You can use special variables to send specific data pertaining to the event. For more information about the variables, see <xref class="ParaTextOnly" href="Help-System-Variables.htm">System variables</xref>.

Execute command actions

You can configure execute command actions to execute a command on a file when an event is triggered. Execute command actions contain an Executable Path, Command Line Parameters, and a Completion Wait Time parameter. For the Completion Wait Time parameter, you can enter the number of seconds to wait after starting the executable path. Enter zero for no waiting.

Time spent waiting delays any processing that <variable name="MyVariables.ProductNameShort"> can perform. </variable>

A wait value should only be used to give an external program enough time to perform an operation, such as move a log file before it is deleted (for example, $LogFilePath for the Log File Deleted event). You can use special variables to send specific data pertaining to the event. For more information about the variables, see <xref class="ParaTextOnly" href="Help-System-Variables.htm">System variables</xref>.

Windows Event Log

By writing event messages to a local Windows Event Log, you can monitor and record <variable name="MyVariables.ProductNameShort"> activity by using third-party network management software. All messages appear in the Windows Application Log from a source of <variable name="MyVariables.ProductNameShort">.</variable></variable>

This event has only one field:

  • Log Information: The contents of the message to be written into the event log. This is normally either a human-readable message (for example, filename uploaded by person) or a machine-readable string (for example, filename|uploaded|person), depending on who or what is expected to read these messages. <variable name="MyVariables.ProductNameShort"> system variables are supported in this field. This field can be left blank, but usually is not. </variable>

Microsoft Message Queuing (MSMQ)

Microsoft Message Queuing (MSMQ) is an enterprise technology that provides a method for independent applications to communicate quickly and reliably. <variable name="MyVariables.ProductNameShort"> can send messages to new or existing MSMQ queues whenever an event is triggered. Corporations can use this feature to tell enterprise applications that files have arrived, files have been picked up, partners have signed on, or many other activities have occurred.</variable>

These events have the following two fields:

  • Message Queue Path: The MSMQ path that addresses the queue. Remote queues can be addressed when a full path (for example, MessageServer\Serv-U Message Queue) is specified. Public queues on the local machine can be addressed when a full path is not specified (for example, .\Serv-U Message Queue or Serv-U Message Queue). If the specified queue does not exist, <variable name="MyVariables.ProductNameShort"> attempts to create it. This normally only works on public queues on the local machine. You can also use <variable name="MyVariables.ProductNameShort"> system variables in this field.</variable></variable>
  • Message Body: The contents of the message to be sent into the queue. This is normally a text string with a specific format specified by an enterprise application owner or enterprise architect. <variable name="MyVariables.ProductNameShort"> system variables can also be used in this field. This field may be left blank, but usually is not.</variable>

Microsoft message queues created in Windows do not grant access to SYSTEM by default, preventing <variable name="MyVariables.ProductNameShort"> from writing events to the queue. To correct this, after creating the queue in MSMQ, right-click it, select Properties, and then set the permissions so that SYSTEM (or the network account under which <variable name="MyVariables.ProductNameShort"> runs) has permission to the queue.</variable></variable>

Event filters

Use event filters to control when a <variable name="MyVariables.ProductNameShort"> event is triggered. By default, events trigger each time the event occurs. The event filter allows events to be triggered only if certain conditions are met. For example, a standard event may trigger an email each time a file is uploaded to the server. However, by using an event filter, events can be triggered on a more targeted basis. For example, you can configure a File Uploaded event to only send an email when the file name contains the string important, so an email would be sent when the file Important Tax Forms.pdf is uploaded but not when other files are uploaded to the server. Additionally, you can configure a File Upload Failed event to run only when the FTP protocol is used, not triggering for failed HTTP or SFTP uploads. You can do this by controlling the variables and values related to the event and by evaluating their results when the event is triggered.</variable>

Event filter fields

Each event filter has the following critical values that must be set:

  • Name: This is the name of the filter, used to identify the filter for the event.
  • Description (Optional): This is the description of the event, which may be included for reference.
  • Logic: This determines how the filter interacts with other filters for an event. In most cases, AND is used, and all filters must be satisfied for the event to trigger. The function of AND is to require that all conditions be met. However, the OR operator can be used if there are multiple possible satisfactory responses (for example, abnormal bandwidth usage of less than 20 KB/s OR greater than 2000 KB/s).
  • Filter Comparison: This is the most critical portion of the filter. The Filter Comparison contains the evaluation that must occur for the event to trigger. For example, a filter can be configured so that only the user admin triggers the event. In this case, the comparison is If $Name = (is equal to) admin, and the data type is string. For bandwidth, either an unsigned integer or double precision floating point value is used.
Event filters also support wildcards when evaluating text strings. The supported wildcards include:
  • * - The asterisk wildcard matches any text string of any length. For example:
    • An event filter that compares the $FileName variable to the string data* matches files named data, data7, data77, data.txt, data7.txt, and data77.txt.
  • ? - The question mark wildcard matches any one character, but only one character. For example:
    • An event filter that compares the $FileName variable to the string data? matches a file named data7 but not data, data77, data.txt, data7.txt, or data77.txt.
    • An event filter that compares the $FileName variable to the string data?.* matches files named data7 and data7.txt but not data, data77, data.txt, or data77.txt.
    • An event filter that compares the $Name variable to the string A???? matches any five-character user name that starts with A.
  • [] - The bracket wildcard matches a character against the set of characters inside the brackets. For example:
    • An event filter that compares the $FileName variable to the string data[687].txt matches files named data6.txt, data7.txt and data8.txt but not data5.txt.
    • An event filter that compares the $LocalPathName variable to the string [CD]:\* matches any file or folder on the C: or D: drives.
You can use multiple wildcards in each filter. For example:
  • An event filter that compares the $FileName variable to the string [cC]:\*.??? matches any file on the C: drive that ends in a three letter file extension.
  • An event filter that compares the $FileName variable to the string ?:\*Red[678]\?????.* matches a file on any Windows drive, contained in any folder whose name contains Red6, Red7 or Red8, and that also has a five character file name followed by a file extension of any length.

Event filters

Event filters are used by comparing fields to expected values in the Event Filter menu. The best example is raising an event only when a certain user triggers the action, or when a certain file is uploaded. For example, an administrator may want to raise an email event when the file HourlyUpdate.csv is uploaded to the server, but not when other files are uploaded. To do this, create a new event in the Domain Details > Events menu. The Event Type is File Uploaded, and on the Event Filter tab a new filter must be added. The $FileName variable is used and the value is HourlyUpdate.csv as shown below:

Help-EventsFilter1.png

As another example, it may be necessary to know when a file transfer fails for a specific user account. To perform this task, create a new File Upload Failed event, and add a new filter.

The filter comparison is the $Name variable, and the value to compare is the user name, such as ProductionLineFTP:

Help-EventsFilter2.png

You can also filter for events based on specific folders using wildcards. It may be necessary to trigger events for files uploaded only to a specific folder, such as when an accounting department uploads time-sensitive tax files. To filter based on a folder name, create a new File Uploaded event in the Domain Details > Events menu, and set it to Send Email. Enter the email recipients, subject line, and message content, and then open the Event Filters page. Create a new event filter, and add the filter comparison If $LocalPathName = (is equal to) C:\ftproot\accounting\* with the type of (abcd) string. This will cause the event to trigger only for files that are located within C:\ftproot\accounting\.

Help-EventsFilter3.png
Last modified
10:52, 20 Jul 2016

Tags

Classifications

Public