This command is experimental


sendemail command generates an email notification when the alert is triggered and sends it to a specified email address or several email addresses. The email contains the link to the notebook from where the notification was sent.

Teragrep instance doesn’t include an SMTP server. You need one to be able to send an email.


SMTP Server Configuration

You can configure the SMTP server connection from a notebook with following config set:


The config list contains following items:

  • dpl.smtp.username

    Sets the username

  • dpl.smtp.password

    Sets the password

  • dpl.smtp.server

    Sets the server url

  • dpl.web.url

    Defines the site url that is sent in the notification email, by default the url will be localhost:8080

  • dpl.pth_10.transform.sendemail.restrictedMode

    Restricts sendemail command’s parameters to subject and to, options are TRUE and FALSE

  • dpl.pth_10.transform.sendemail.parameter.from

    Defines the sender’s address, you can define this with from parameter as well

  • dpl.smtp.encryption

    Defines the encryption, options are PLAIN, SSL and TLS

You can configure more than this but this config set is the bare minimum.

Send the Notification Email

To be able to send a notification email, you need to include to="" parameter. You can include one or more email addresses in the parameter by separating addresses with a comma.

index=example | sendemail to=""

The email notification is sent every time when someone runs the paragraph.

Set the Sender for the Email

You can define the sender for the notification email by using from="" parameter. If you have already configured this with spark.conf interpreter, the parameter will override the configuration.

index=example | sendemail to="" from=""

Set the Subject for the Email

You can set a subject for the notification email with subject="". By default, the subject in the notification email will be 'Teragrep Results'.

index=example | sendemail to="" subject="Teragrep alert: alert name"

Set the Email Message

This feature is not yet implemented but will come in future.