Events with email
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter
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.
Before you can send events with email, you need a dedicated email address from Datadog:
- Log in to your Datadog account.
- From the Account menu at the bottom left, select Organization Settings.
- Click the Events API emails tab.
- Choose the format for your messages from the Format dropdown (
Plain text or
- Click the Create API email button.
- See the APIs page for your results.
The Events API emails section displays all the emails available for your applications and who created them.
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.
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 doesn’t show in your event stream.
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.
With a plain text formatted email, the following fields are controllable:
|Sender email address
||The email address of the sender
||The subject of the email
||The body of the email
For example, the email below is a valid submission:
Sender's email: firstname.lastname@example.org
Subject: Env:Test - System at 50% CPU - #test
Body: This is a test message showing that env:test is at 50% CPU - #test
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. Tags can be added by using
# in message body. Example event sent with plain text:
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
"title": "Did you hear the news today?",
"text": "%%% \n [an example link](http://catchpoint.com/session_id \"Title\") \n %%%",
If you are embedding a link in a Markdown block, make sure the URL is encoded properly:
# Not encoded