Network Performance Monitoring is now generally available! Network Monitoring is now available!

Events with Email

If your application does not have an existing Datadog integration, and you don’t want to create a custom Agent check, you can send events with Email.

Setup

Before you can send events with Email, you need a dedicated Email address from Datadog:

  1. Log in to your Datadog account.
  2. Go to the Integrations menu, choose APIs.
  3. Expand Events API Emails.
  4. Choose the format for your messages from the Format dropdown (Plain text or JSON).
  5. Click the Create API Email button.

The Events API Emails section displays all the Emails available for your applications and who created them.

Submission

There are two different ways to send events with Email:

If you have complete control over the Email sent by an application, then you can use configure a JSON-formatted message. This format allows you to set everything in the event that appears in Datadog.

Source Email

With a JSON-formatted Email, the following fields are controllable:

Note: If your JSON is not properly formatted, or the Email is sent without a subject, the event won’t show in your event stream.

Datadog event

In a JSON-formatted Email, the subject of the Email doesn’t appear in the event. The value of the title attribute is used for the event title. All data that appears in the event should be defined in JSON in the body of the Email. Furthermore, the body must be pure, well-formed JSON—if not, the message is ignored. Example event sent with JSON:

Note: If you are testing the Email with a standard Email client, the body may be converted to HTML. This causes the body to no longer be pure JSON, resulting in an ignored Email.

If you have little control over the Email sent by an application, use a plain text formatted message.

Source Email

With a plain text formatted Email, the following fields are controllable:

FieldRequiredDescription
Sender Email addressYesThe Email address of the sender
SubjectYesThe subject of the Email
BodyNoThe body of the Email

For example, the Email below is a valid submission:

Sender's Email: matt@datadog.com
Subject: Env:Test - System at 50% CPU - #test
Body: This is a test message showing that env:test is at 50% CPU - #test

Datadog event

The subject of the Email becomes the title of the event and the body of the Email becomes the event message. The sender of the Email appears at the bottom of the event. Example event sent with plain text:

Note: Although it looks like a tag appears at the end of the title and body of the event, neither instance are actually tags.

Markdown

Datadog event text supports Markdown but embedding HTML in Markdown is not supported. To use Markdown in the event text, start the text block with %%% \n and end the text block with \n %%%:

{
      "title": "Did you hear the news today?",
      "text": "%%% \n [an example link](http://catchpoint.com/session_id \"Title\") \n %%%",
      "priority": "normal",
      "tags": ["environment:test"],
      "alert_type": "info"
}

If you are embedding a link in a Markdown block, make sure the URL is encoded properly:

# Not encoded
http://catchpoint.com/session_id:123456

# Encoded
http://catchpoint.com/session_id%3A123456
Table of Contents