Email (SMTP) alert notifications
Overview
The configuration for SMTP-based alert notifications has two components:
The configuration of an SMTP gateway by the Delphix system administrator
The configuration of one or more alert profiles (if needed)
Configuring the SMTP gateway
Before email-based alerts can function properly, many organizations require that an SMTP gateway is configured, through which all outbound email is sent.
Contact the appropriate administrator for your site in order to determine the SMTP gateway settings.
Login to the Delphix setup application as sysadmin or another user with system administrator privileges.
On the Dashboard screen, locate the Outbound connectivity section, and click modify.
Outbound Connectivity for SMTP Gateway
If not checked already, check the box next to Use an existing SMTP server.
At a minimum, enter the required information:
SMTP Server Name of IP Address
SMTP port
From Email Address This will be the email address from which all alert emails will be sent.
In Test Email Address, enter the same email address to verify that you are able to receive email properly.
Click Save to save changes.
For further information, see the “Outbound Connectivity” section of Initial Setup
Alert profiles
The Delphix Engine can send out email notifications when alerts happen. Alert profiles control this functionality.
An alert profile is composed of two things:
Filter Specification: A filter, or combination of filters, that specifies which alerts are of interest.
Alert Action: This specifies the email addresses to which the Delphix Engine will send an email when an alert matches the filter specification.
By default, the Delphix Engine has a single alert profile configured with the following parameters:
Filter Specification: Match any alert with a severity level of CRITICAL or WARNING.
Alert Actions: Send an email to the address defined for user admin.
Default domain user
The default domain user created on Delphix Engines is now admin instead of delphix_admin. When engines created before 5.3.1 are upgraded to 5.3.1 or later they will retain their old username 'delphix_admin'. To avoid complications Delphix recommends creating users with an admin role and then Disabling delphix_admin.
Using the CLI, it is possible to:
Modify the system default alert profile
Create additional profiles in addition to the default one
Set multiple actions for a single profile, such as "email dephix_admin" and "email user1@mycompany.com".
Simple filters
Filtered by Owner of alerts target – for example, objects owned by user 1
Complex filters
Complex filters combine/modify other sub-filters:
“And” filter – Used when all conditions defined must be met for the filter to notify the user with an email
“Or” filter – Used when either one or the other of the conditions defined in the filters must be met for the filter to notify the user with an email
“Not” filter – Used to exclude items
Limitations
This is a CLI feature.
Alert Profiles do not override permission settings. If you do not have Read permission on an object then your alert profile will never get triggered for that object's alerts, regardless of your filter settings.
The following CLI examples will run through how to create these three filters. Each example provides three different methods of setting up a profile. These include the following:
A simple profile
A profile with two filters
A complicated profile
For more information, see CLI Cookbook: Creating Alert Profiles
A simple profile
A simple profile approach matches the Delphix out-of-the-box default alert profiles. To create a simple alert profile using the CLI as seen in the figure below, go into the alert profile section of the command-line interface (CLI) and create a new profile. Line four prompts the engine to send an email when the filters are triggered. The following three command lines refer to the filter specifications. Follow two severity levels: warning and critical. This will trigger an email alert when any warning or critical events occur.
delphix > cd alert
delphix alert > cd profile
delphix alert profile > create
delphix alert profile create > set actions.0.type=AlertActionEmailUser
delphix alert profile create > set filterSpec.type=SeverityFilter
delphix alert profile create > set filterSpec.severityLevels.0=CRITICAL
delphix alert profile create > set filterSpec.severityLevels.1=WARNING
delphix alert profile create > commit
Simple Alert Profile example in the CLI
A compound alert profile
Creating a compound alert profile in the CLI will combine two filters together. This profile triggers an email about any alert on objects owned by the delphix_admin plus any other alert that is critical. The compound alert profile creates two filters. The first one will be the target owner filter, which in this case is admin. The second filter is the severity filter, allowing users to match anything that is critical. Combine these two filters using the OR logic so that if any of the sub-filters match, the whole filter matches. An example of this can be seen in the figure below.
Alert Profile using OR logic
While working in the CLI, the first four lines describe a simple alert profile. The distinction between simple and compound alert profiles is that in a compound profile, the top-level filter uses an OR filter with sub-filters for target owner and severity level, as seen in line five of the figure below.
delphix > cd alert
delphix alert > cd profile
delphix alert profile > create
delphix alert profile create > set actions.0.type=AlertActionEmailUser
delphix alert profile create > set filterSpec.type=OrFilter
delphix alert profile create > set filterSpec.subFilters.0.type=TargetOwnerFilter
delphix alert profile create > set filterSpec.subFilters.0.owners.0=delphix_admin
delphix alert profile create > set filterSpec.subFilters.1.type=SeverityFilter
delphix alert profile create > set filterSpec.subFilters.1.severityLevels.0=CRITICAL
delphix alert profile create > commit
A Compound Alert Profile
Complex alert profile
A complex alert profile uses the profile filter created in the compound alert profile and modifies it. For the example shown in the figure below, you have a VDB named test_instance that you do not need any emails about. The following commands will create an effective filter.
Create an OR filter with two sub filters: target owner and event type.
Create a NOT filter that will exclude the VDB (test_instance) from which you do not want to receive notifications.
Use the AND logic to combine all these filters together, as seen below.
Complex Alert Profile
Below is an example of the command lines used to set up this complex profile.
delphix > cd alert
delphix alert > cd profile
delphix alert profile > create
delphix alert profile create > set actions.0.type=AlertActionEmailUser
delphix alert profile create > set filterSpec.type=AndFilter
delphix alert profile create > set filterSpec.subFilters.0.type=NotFilter
delphix alert profile create > edit filterSpec.subFilters.0.subFilter
delphix alert profile create filterSpec.subFilters.0.subFilter > set type=TargetFilter
delphix alert profile create filterSpec.subFilters.0.subFilter > set targets.0=test_instance
delphix alert profile create filterSpec.subFilters.0.subFilter > back
delphix alert profile create > set filterSpec.subFilters.1.type=OrFilter
delphix alert profile create > set filterSpec.subFilters.1.subFilters.0.type=TargetOwnerFilter
delphix alert profile create > set filterSpec.subFilters.1.subFilters.0.owners.0=delphix_admin
delphix alert profile create > set filterSpec.subFilters.1.subFilters.1.type=SeverityFilter
delphix alert profile create > set filterSpec.subFilters.1.subFilters.1.severityLevels=CRITICAL
delphix alert profile create > commit
Complex Alert Profile CLI
Creating alert profiles
SSH into your engine's CLI using your delphix_admin username and password
CODEssh delphix_admin@yourdelphixengine
Start creating your new profile. After logging in to get to the alert section enter alert.
CODEdelphix > alert delphix alert > profile delphix alert profile > create delphix alert profile create > ls
Set Action(s) Use AlertActionEmailListif you want to specify a list of email addresses for this profile.
CODEdelphix alert profile create > set actions.0.type=AlertActionEmailList delphix alert profile create > set actions.0.addresses.0=<email address to send to> delphix alert profile create > set actions.0.addresses.1=<additional email address> delphix alert profile create > set actions.0.addresses.2=<additional email address>
Or, use AlertActionEmailUser if you just want the emails to go to the email address associated with this Delphix user.
CODEdelphix alert profile create > set actions.0.type=AlertActionEmailUser
It is possible to add more than one action here, so you may use both AlertActionEmailList and AlertActionEmailUser if desired.
Set filter Here is an example of setting a simple severity filter. With this filter, emails will be sent for any CRITICAL or WARNING alerts.
CODEdelphix alert profile create > set filterSpec.type=SeverityFilter delphix alert profile create > set filterSpec.severityLevels.0=CRITICAL delphix alert profile create > set filterSpec.severityLevels.1=WARNING
Here is an example of setting a simple target-owner filter. With this filter, emails will be sent for any alert whose target is owned by delphix_admin.
CODEdelphix alert profile create > set filterSpec.type=TargetOwnerFilter delphix alert profile create > set filterSpec.owners.0=delphix_admin
Here is an example of a compound filter. With this filter, we combine the above two filters – an email is sent when an alert is CRITICAL or WARNING, and the alert's target is owned by delphix_admin.
CODEdelphix alert profile create > set filterSpec.type=AndFilter delphix alert profile create > set filterSpec.subFilters.0.type=SeverityFilter delphix alert profile create > set filterSpec.subFilters.0.severityLevels.0=CRITICAL delphix alert profile create > set filterSpec.subFilters.0.severityLevels.1=WARNING delphix alert profile create > set filterSpec.subFilters.1.type=TargetOwnerFilter delphix alert profile create > set filterSpec.subFilters.1.owners.0=delphix_admin
Commit your changes
CODEdelphix alert profile create > commit
Profile filters
As seen above, you can use different filter types to customize which alerts the Delphix Engine will send emails about. The various filter types are listed below.
Simple filters
Filter type | Purpose | Example | Allowed Values |
---|---|---|---|
SeverityFilter | Match based on the alert's severity level (critical, warning, informational) | severityLevels.0=CRITICAL severityLevels.1=WARNING This would match any alert whose severity level is CRITICAL or WARNING. | 1 or more of:
|
EventFilter | Match based on the alert's event type. | eventTypes.0=fault.* This would match any alert that is generated due to a newly-raised fault on the engine. | One or more text entries, optionally using the * wildcard. |
TargetFilter | Match based on the alert's target. | targets.0=”Group/DB” This would match any alert whose target is the database “DB” located in the group “Group”. | Any object in the system. 1 or more objects may be specified. |
TargetOwnerFilter | Match based on the owner of the alert's target. | owners.0=delphix_admin This would match any alert whose target's owner is the delphix_admin user. | Any user in the system. 1 or more users may be specified. |
Compound filters
These filters combine/modify the behavior of other filters, called "subfilters". The subfilters may be of any type (simple or complex).
Filter Type | Purpose | Number of subfilters required |
---|---|---|
AndFilter | This filter matches if all subfilters match | 2 or more |
OrFilters | This filter matches if any subfilter matches. | 2 or more |
NotFilter | This filter matches if the subfilter does not match. | 1 |
Action types
With the AlertActionEmailUser type, notification emails will be sent to the email address of the user who owns the alert profile.
With the AlertActionEmailList type, a list of email addresses must be specified in the "addresses" array. Notification emails will be sent to these addresses.
Email format options
You can send plain text as well as structured JSON. JSON can be useful for constructing solutions that will parse the email and perform further actions (notify, escalate, log).
To change the format, while updating an alert profile:
delphix alert profile ALERT_PROFILE-X update > set actions.0.format=<JSON|TEXT>