Redwood Documentation

Product Documentation

 

›Email Alert Gateways

RunMyJobsAlerting

Triggering Alerts

  • Active Monitoring Module
  • Triggering Alerts
  • Process Alert Sources
  • Raising Alerts and Notifications from Processes
  • Process Server Alert Sources
  • Raising Alerts and Notifications from Process Servers
  • Ad Hoc Alert Sources
  • Using Ad Hoc Alert Sources
  • Monitor Alert Sources

Escalation Routes

  • Defining Escalation Routes

Email Alert Gateways

  • Email Alert Gateways
  • Creating and Configuring Email Alert Gateways

Alerting Routes

  • Visualizing Alerting Routes
← Defining Escalation RoutesCreating and Configuring Email Alert Gateways →

Email Alert Gateways

Alerting gateways specify the addressee as well as the content of the message that is to be sent to the operator.

Tabs & Fields

The following table illustrates the fields of each tab of Email Alert Gateway editor dialogs.

TabFieldDescription
Email Alert GatewayPartitionThe Partition where you wish to store the email alert gateway
Email Alert GatewayNameThe name of the email alert gateway can contain any combination of US ASCII letters, digits, and underscores; limited to 80 characters.
Email Alert GatewayApplicationThe Application of the email alert gateway
Email Alert GatewayDescriptionThe description of the email alert gateway can contain any combination of printable UTF-8 characters, limited to 255 characters.
Email Alert GatewayAddress PatternThe email address pattern that this email alert gateway should use, note that you can use substitution parameters in this field
Email Alert GatewayProcessing OrderThe order in which email alert gateways are processed, the first that matches will be used.
Email Alert GatewayAlert Resend Delay (in minutes)The delay in minutes before trying to resend a failed alert.
Email Alert GatewayAlert Rate LimitThe number of alerts that can be sent to an address within the alert rate window.
Email Alert GatewayAlert Rate Interval (in minutes)The time interval in minutes for calculating the alert rate.
DocumentationDocumentationA comment about the email alert gateway
HeadersNameThe name of the email header to use; valid email headers include subject, to, bcc ...
HeadersValueThe value of the header.
File AttachmentsNameThe short name of the file to attach to the email; the file name
ActionsTypeThe type of action, limited to Presend on email alert gateways, they fire before an email is sent so you can suppress or customize it.
ActionsEnabledThis checkbox allows you to enable or disable the action; when unchecked, the action will never fire.
ActionsLibraryYou can specify a library here containing methods you would like to use. It is recommended to save your code in libraries so you can use it elsewhere.
ActionsAction SubjectThe user under which the code in the action is performed. You must set an action subject if you want to use jcsSession
ActionsSourceThe source of your code.
ActionsStub SourceThis code shows you where the action will be performed.
EmailBodyThe body of the email to send, see Customizing email messages for information on how you can customize it.
Security*This is where you can specify who can access/change/remove the email alert gateway.

Context-Menu

Email alert gateways support the following context-menu actions:

ActionDescription
Edit SecurityEdit the security of the e-mail alert gateway
DuplicateMake a copy of the e-mail alert gateway to create a similar one
DeleteDelete the e-mail alert gateway
Export > ExportExport the e-mail alert gateway into a CAR file
Export > Export with related objectsExport the e-mail alert gateway into a CAR file including referenced objects
Promote > Promote to systemPromote the object to a remote system
Promote > Edit further then promoteEdit the export rule set prior to promoting
PromotePromote the e-mail alert gateway to another Redwood Server instance
EditEdit the e-mail alert gateway
Show PermalinksShow links that can be used from third party applications to link to the object
Add to navigation barAdd the current object to the navigation bar
New e-mail alert gatewayCreate a new e-mail alert gateway
Show diagramDisplay the dependencies in a diagram
Filter > New FilterCreate a new e-mail alert gateway filter
Filter > Edit FilterEdit current e-mail alert gateway filter
Filter > DeleteDelete current e-mail alert gateway filter
Filter > Duplicate FilterCreate a copy of the filter
Filter > Export FilterExport the filter into a CAR file
Filter > Add to navigation barAdd the filter to a navigation bar
Filter > Create filter from searchCreate a filter from the current IntelliSearch query

Address Patterns

Email alert gateways use patterns rather than names so that gateways can apply to all recipients of a particular group and aliases with specific naming conventions can be used to minimize the number of required gateways.

Patterns support two wildcards:

  • * - matches any number of characters
  • ? - matches any single character.

Example:

  • *@example.com - matches all recipients at Example Inc. (example.com)
    • jdoe@example.com - MATCHES
    • jdoe@us.example.com - DOES NOT MATCH
  • er?@example.com - matches all three letter strings starting with ER
    • erp@example.com - MATCHES
    • ER1@example.com - MATCHES
    • ERP1@example.com - DOES NOT MATCH

Variables

The variables that can be used in alert gateways depend on the object that caused the alert to be fired. You can use all valid variables of the alert source along with the gateway-specific variables:

  • Process Alert Sources
  • Monitor Alert Sources
  • Process Server Alert Sources
  • Ad Hoc Alert Sources
  • Alert Email Gateways
note

Note that the variable you use must be filled. Using the remoteStatus variable on an alert from a JDBC job (which does not have a remote status) will cause errors to be thrown. You can use conditional expressions to determine the alert source and object that caused the alert to determine which variables are available.

Headers

Email gateways also allow you to override email headers. This is handy if you want to adapt the subject or add a reply-to address, for example. There is a special email header that can be used to override the SMTP server, named X-Redwood-Server. You can also add other custom email headers that may be required by your email system. You can use substitution parameters in email gateways, this allows you to dynamically set the subject of the email, for example.

The substitution parameters that can be used in headers are listed in Scripting Contexts and Implicit Objects

  • ${address} - the addressee's address
  • ${messageTitle} - the title of the message
  • ${subject} - the subject
  • ${message} - the message
  • ${alertSource} - the alert source that triggered the alert
  • ${object} - the object that triggered the alert

Mail headers starting with $MIME-Body-<name> set the MIME header <name> on the email body.

Valid Mime Headers include:

  • Content-Description - a description for an object in the email
  • Content-Disposition - presentation information for the email or part of it
  • Content-ID - automatically generated globally unique identifiers
  • Content-Transfer-Encoding - indicates whether or not a binary-to-text encoding has been used and if yes, which one
  • Content-Type - MIME type used, for example text/plain
  • MIME-Version - MIME version used, currently MIME-Version: 1.0 is the only value allowed.
note

If the source of the email starts with < Redwood Server will set the Content-Type to text/html, otherwise it will be set to text/plain. You can override this with the headers.

Files

You can attach files of the failed process to the email. This allows the operator to troubleshoot the problem without the need to connect to the system and gives other addressees, like managers, information on what went wrong, if they need to know.

Usually, you would send stderr.log which should contain specific error messages. The standard output is usually stored in stdout.log, you can specify a short name of any process file.

Alerting Gateway Actions

Actions allow you to write script custom reactions to alerts in RedwoodScript. Stub code is already available to you and contains predefined objects.

ObjectClassExample Code
jcsOutLogcom.redwood.scheduler.infrastructure.logging.api.LoggerjcsOutLog.info("This is an informational message");
jcsEmailAlertGatewayPreSendActionContextcom.redwood.scheduler.api.scripting.variables.EmailAlertGatewayPreSendActionScriptObjectjcsEmailAlertGatewayPreSendActionContext.getMessage();
jcsSessioncom.redwood.scheduler.api.model.SchedulerSessionjcsSession.getQueueByName("PRD_Queue");
note

The jcsSession object is only available when you set an Action Subject.

Gateway Emails

Gateways will always attempt to use the most specific email, the search is done in the following order:

  • specific alert source email
  • the gateway email
  • the default email

The email type is detected by the first letter, if the first letter is a <, then the email type is set to HTML, otherwise a text email is sent. You can use specific constructs using REL expressions in your emails. For more information, see Creating and Configuring Alert Gateways.

Finding Email Alert Gateways

You can search for email alert gateways using filters and the Search Email Alert Gateways box on the Email Alert Gateways tab. This box is known as the IntelliSearch box and located under your username on the top right-hand side of the user interface. Filters allow you to specify a list of objects with static criteria. IntelliSearch allows you to specify complex queries in a simple way using prefixes. Prefixes are used to specify which property you are searching in and have short as well as long syntaxes. For example, if you want to display all email alert gateways with the term management in the comment, you would use the search criteria as follows:

c:management

You can search more than one property, as follows:

c:management n:corp
note

No spaces should be entered before or after the colon (: ).

See the Advanced Object Search for more information.

The following table illustrates the available prefixes for email alert gateways:

PrefixesDescription
n, namesearches the name property
c, comm, commentsearches the documentation property
d, desc, descriptionsearches the description property
a, applicationsearches the application property
cb, changedbefore(internal) search for alert gateways that changed before a certain ISO-8601 period

Deleting Email Alert Gateways

You can only delete gateways when no other objects relate to them. For example, if there are alert escalations that use the gateway, the gateway cannot be deleted until all alert escalations that use it have been modified. You can see all alert escalations that relate to the gateway in Related Objects in the lower detail pane and on the show page.

The table in related objects contains three columns:

  • Type - the type of object with a link to it
  • Related Object - the name of the object with a link to it
  • Used As - objects can sometimes be used in different roles

Security

PrivilegeDescription
EmailAlertGateway.CreateCreate email alert gateways
EmailAlertGateway.DeleteDelete email alert gateways
EmailAlertGateway.EditEdit email alert gateways
EmailAlertGateway.ViewAccess email alert gateways

You can grant privileges on two levels, Access and Admin; a privilege granted on Admin level allows the grantee to grant the privilege to other users. These privileges can be granted per partition or system-wide.

The Security tab allows you to specify which users can access, edit, and delete the email alert gateway.

  • Granting and Revoking System Privileges
  • Granting or Revoking Object Privileges

See Also

  • Creating and Configuring Alert Gateways
  • Documenting Objects using the Documentation Tab
← Defining Escalation RoutesCreating and Configuring Email Alert Gateways →
  • Tabs & Fields
  • Context-Menu
  • Address Patterns
  • Variables
  • Headers
  • Files
  • Alerting Gateway Actions
  • Gateway Emails
  • Finding Email Alert Gateways
  • Deleting Email Alert Gateways
    • Security
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |