Skip to main content
Delphix

Configuring Alert Emails using CLI (KBA1005)

 

 

Note

Note:

This article is no longer current and is superseded by the documentation: https://docs.delphix.com/docs/config...-notifications.

 

By default there is one alert profile configured by the Delphix Engine during the initial set up. That profile is owned by the Delphix Engine Admin user, and is configured to send emails to the user whenever there is an alert with CRITICAL or WARNING severity. 

How to Add Alert Profiles

  1. SSH into your engine's CLI using your Delphix Engine Admin user credentials.

    ssh delphix_admin@yourdelphixengine

  2. Create your new profile.

    delphix alert > profile

    delphix alert profile > create

    delphix alert profile create * > ls

  3. Set Action(s) using either:

  •  AlertActionEmailList if you want to specify a list of email addresses for this profile.

delphix 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>

  • AlertActionEmailUser if you just want the emails to go to the email address associated with this Delphix user.

delphix alert profile create *> set actions.0.type=AlertActionEmailUser

It is possible to add more than one action here. Note that you may use both AlertActionEmailList and AlertActionEmailUser if desired.
 

  1. 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.

    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

    Here is an example of setting a simple target-owner filter.
    ith this filter, emails will be sent for any alert whose target is owned by delphix_admin.

    delphix 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 send when an alert is CRITICAL or WARNING, and the alert's target is owned by delphix_admin.

    delphix 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

      

  2. Commit your changes.

    delphix alert profile create *> commit

Filters

As shown above, there are multiple types of filters that can be used and combined together. For the full list of available filters see 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:

  • CRITICAL
  • WARNING
  • INFORMATIONAL 

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