Version: 7.x-36.0.0

This is a technical preview. Technical preview features are not fully supported, may not be functionally complete, and are not suitable for deployment in production. We encourage you to try them out and provide your feedback, good and bad, on the Search Guard forum. This will help us improve and add any features you might be missing.

Email Action

Use e-mail actions to send e-mail notifications from watches. You can use Mustache templates to define dynamic content for mail subject and content.

Prerequisites

In order to use e-mail actions, you need to configure an SMTP server using the accounts registry of Signals.

Basic Functionality

A basic e-mail action looks like this:

 {
     /* ... */ 
 
	"actions": [
		{
			"type": "email",
			"name": "my_email_action",
			"throttle_period": "1h",
			"account": "internal_mail",
			"to": "notify@example.com",
			"subject": "Bad destination weather for  flights over last !",
			"text_body": "Flight Number: \n  Route:  -> "
		}
	]
}

The basic configuration attributes are:

name: A name identifying this action. Required.

checks: Further checks which can gather or transform data and decide whether to execute the actual action. Optional.

throttle_period: The throttle period. Optional. Specify the time duration using an amount, followed by its unit. Supported units are m (minutes), h (hours), d (days), w (weeks). For example, 1h means one hour.

account: Identifies the SMTP server and account which shall be used for sending the email. See the accounts registry documentation.

to: Specifies the e-mail address of the recipient of the mail. Multiple recipients can be specified by using an array. Optional. Falls backs to defaults set in the account configuration.

cc, bcc: Further recipient email addresses can be specified using the attributes cc and bcc. Optional. Falls backs to defaults set in the account configuration.

from: Specifies the from address of the e-mail. Optional. Falls backs to defaults set in the account configuration.

subject: Defines the subject of the mail. Mustache templates can be used to render attributes from the watch runtime data. Required.

text_body: Defines the content of the mail. Mustache templates can be used to render attributes from the watch runtime data. Optional.

Technical Preview Limitations

  • HTML mails are not supported
  • Attachements are not supported

Not what you were looking for? Try the search.