1. Mailjet
  2. Support
  3. Documentation

Real-Time Monitoring

 

Summary

Introduction

Monitor business critical transactional emails - sent via SMTP or Send API - with Mailjet’s Real-Time Monitoring.

Create custom alerts with real-time notifications to be on top of any potential issues and take the appropriate action. For example:

• Your company typically sends 10 order confirmation emails every hour. Get alerted when less than 4 order confirmation messages have been sent in the last 2 hours.

• You sends out emails on behalf of several customers, and the delivery time is quite important. You want to be notified when these emails take longer than 3 minutes to be delivered so you can proactively manage your customer’s questions.

• A private flash sales announcement is sent every Saturday to your top customers. This is a very popular email with at least a 20% click rate. Have an alert that runs only on the weekend to notify you if the click threshold goes under 20%.

In this guide, you will learn how to group your messages into categories, create alerts, and set up different notifications channels, and view all notifications within the Real-Time Monitoring Feature.

Real-Time Monitoring

Please note: Real-Time Monitoring is only available on Premium Plans (Crystal and above) only.

[top]

Real-Time Monitoring Overview

In a nutshell, a custom header is added to your transactional emails identifying a category. You then create alerts within that category to monitor volume, statistics, delivery times, etc. When that alert is triggered, you receive a notification :)

Categories

You create CATEGORIES to group similar types of transactional emails that you want to monitor. And a given transactional email can only belong to one category.


Example of how to group your emails:

• Create a broad “Orders” category to monitor all order related emails (new orders, order payments, etc)
• Create a category to focus on a specific type of email, such as “Password-Reset” or “Account-Creation”
• If you send emails on behalf of your clients, you can create a category for each client

Create up to 50 categories per API Key:

Real-Time Monitoring

Once the categories have been created, you will need to update your transactional email scripts to include the new category header. (This step requires technical knowledge and is done outside of your Real-Time Dashboard.)

Alerts

Within each category, you can create multiple ALERTS (up to 50 alerts per API Key).

There are 4 types of alerts you can create:

• Unusual Volume Alert
• Unusual Statistics Alert
• Delivery Delay Alert
• Errors on Critical Messages Alert

Real-Time Monitoring

When the conditions of the alert are met, you are notified.

[top]

 
Notifications

For each alert you create, you can set one or more NOTIFICATION methods: email*, Slack Channel, and SMS (coming soon).

By default, all alert notifications will be shown on your Real-Time Monitoring Overview Dashboard:

Real-Time Monitoring

* Email notifications are not counted against your plan :)

Initial Welcome Onboarding

To setup your Real-Time Monitoring service, the system will guide you through creating your first tracking category and setting up your notification methods (via email and Slack Channel).

This one-time onboarding will only take a few minutes, and once completed, you can then create the alerts for your category.

Ready?

Let’s start by clicking Transactional → Real-Time Monitoring.

Real-Time Monitoring

Then click ‘Continue’ at the Welcome screen.

Real-Time Monitoring

[top]

Step 1: Create Your Monitoring Categories

The monitoring category will be used to group the transactional emails that you want to monitor.

You can create up to 50 categories and you choose how to group your emails.

For example, you can group emails with a similar purpose (i.e. invoice related emails), similar sending patterns (i.e. weekly account summaries), or group emails with similar performances (i.e order invoice emails would typically have a lower bounce rate).

Once you’ve entered the category name, click ‘Save & Continue’.

Real-Time Monitoring

Step 2: Configure your Notification Channels

At this step, you will select how you want to be notified when an alert is triggered: via email, via Slack Channel.

Real-Time Monitoring

Email Notifications:

By default, your account email address has been added to the email notification list, but you can add up to 20 email addresses. (For security reason, please only add the email address of recipients that you trust.)

Click ‘Add email address’ to add a new email entry line. Then enter the email address along with an (optional) label name.

Real-Time Monitoring

Slack Channel Notifications:

Notifications can also be sent to a maximum of 5 Slack Channels via a webhook (learn how to get the Webhook for a Slack Channel in Appendix A).

Simply click on ‘Add Slack Channel’ and enter your webhook.

Real-Time Monitoring

When ready, click ‘Save & Continue’.

Real-Time Monitoring

For security reasons, each email address entered in the notification list will receive an invitation email containing a confirmation code. The recipient is asked to accept the invite by forwarding the email to you.

Once you receive the confirmation code, enter it in the corresponding field then click ‘Submit’...

Real-Time Monitoring

And then the email address will be validated.

Real-Time Monitoring

Note: If you receive an ‘invalid’ code error message, please check that the code was entered in the correct row. Or click the ‘Resend’ link to have a new confirmation code sent to the recipient as the confirmation code is validate for only 15 minutes.

No confirmation is needed for Slack Channels, so just click ‘Continue’ to continue :)

Real-Time Monitoring

Awesome – you’ve successfully set up your first monitoring category and notification channels!

Real-Time Monitoring

As per the screen, please remember to add the new category head to your transactional messages; otherwise the monitoring will not work.

This step requires a developer resource to add a new header to your transactional scripts for the emails associated with your category. Simply replace your_category_name_here with the actual category name you just created:

  • Send API: “MonitoringCategory”: “your_category_name_here”
  • SMTP: X-MJ-MonitoringCategory: your_category_name_here

(Developer Guides on Real-Time Monitoring can be found at dev.mailjet.com).

Now that your scripts are being updated, click ‘Continue’ button to finish the onboarding process and arrive at the Overview Dashboard….

Real-Time Monitoring

At this point, you can create your monitoring alerts for your new category, create more categories, or modify your alert notifications.

[top]

Alerts

Overview

Once you have created a category, you can now create alerts within that category.

The first step in creating an alert is selecting the Alert Type:

  • Unusual Volume Alert
    Be notified when the volume of email is not within the threshold you defined.
  • Unusual Statistics Alert
    Get notified when the statistics (open, bounce, spam, …) is outside of the set threshold.
  • Delivery Delay Alert
    Be alerted when emails are being delivered slower than you expected.
  • Errors on critical messages Alert
    Get immediate notification when critical emails bounce or get blocked.

Real-Time Monitoring

Once you have selected the alert type, you will enter the alert settings:

Real-Time Monitoring

1) Alert Name: A descriptive and unique name for the alert that will be used in the different notification channels (the Overview Dashboard, the email notification subject, etc).

2) Alert Definition: Define the conditions of the alert and the type of notification to be sent (warning or critical). For example, send a critical notification when the open rate is below 10% in the 2 days.

3) Alert Options: Have your alert run all the time or only on specific days & times.

4) Alert Channels: Select the methods of notification for the alert (email, Slack).

In the following sections, we will walk through creating an alert of each type:

Unusual Volume
Unusual Statistics
Delivery Delay
Errors on Critical Messages

[top]

Create Alerts
Unusual Volume Alert


Be notified when no messages or a low volume of messages have been sent/delivered in the predefined time.


For this example, we want to be notified only on the weekends when no account activation emails have been sent in the last 2 hours. This alert will send a critical notification via email and Slack.

From the Alerts tab, click ‘Create new alert’.

Real-Time Monitoring

Select the desired category the alert will applies to. Check ‘Unusual Statisitcs and then click ‘Continue’.

Real-Time Monitoring

Enter a descriptive Alert name.

Under the Alert Definition section, select the following:

• Send me a:   critical notification
• When:           no message
• Was:             sent
• In the last:     2 hours

Real-Time Monitoring

Under Alert Options, select “Only trigger this alert during specific days and times”, and check off only Saturday and Sunday.

Real-Time Monitoring

Under Alert Channels, select an email address and a Slack room. Then click ‘Continue’.

Real-Time Monitoring

Review your alert settings. If any changes are needed, click the ‘cancel’ link. Otherwise click the ‘Create alert’ button.

Real-Time Monitoring

Your new alert will appear on the Alerts page.

Real-Time Monitoring

[top]

Unusual Statistics Alert

Be notified when the statistics rate (delivery, open, click, spam, ...) for messages is above or below a defined threshold over the last hours/days.

We want to be alerted when the open rate is below 5% for order confirmation emails delivered in the last day (24 hours). The warning notification will be sent via email and Slack.

From the Overview page, click ‘Create new alert’.

Real-Time Monitoring

Select the desired category the alert will apply to.
Check ‘Unusual Statisitcs’ and then click ‘Continue’.

Real-Time Monitoring

Enter a descriptive Alert name.

Under the Alert Definition section, select the following:

• Send me a:   warning notification
• When the:     Click rate
• Is:                  below 5 (%)
• In the last:     1 day

Real-Time Monitoring

No changes are needed to Alert Options.

Select your Alert Channels notifications and then click ‘Continue’.

Real-Time Monitoring

Review your alert settings. If any changes are needed, click the ‘back’ link.

Otherwise click the ‘Create alert’ button.

Real-Time Monitoring

Your new alert will appear on the Alerts page.

Real-Time Monitoring

[top]

Delivery Delay
 

Be notified when the first attempt of email delivery takes longer than the predefined time (in minutes).

For this example, we want to be warned when the first delivery attempt of a fiscal report emailed on Friday takes longer than 5 minutes.

From the Overview page, click ‘Create new alert’.

Real-Time Monitoring

Select the desired category the alert will apply to.
Check ‘Delivery delay’ and then click ‘Continue’.

Real-Time Monitoring

Enter a descriptive Alert name.

Under the Alert Definition section, select the following:

• Send me a:    warning notification
• Each time…:  8 minutes

Real-Time Monitoring

In the Alert Options, check only Friday.

Select the Alert Channel notifications, then click ‘Continue’.

Real-Time Monitoring

Review your alert settings, and click the ‘Create alert’ button.

Real-Time Monitoring

Your new alert will appear on the Alerts page.

Real-Time Monitoring

[top]

Error on Critical Messages

Be notified immediately when a message is blocked or bounced.

Please note: This alert is intended for your most critical business messages where the recipient’s email address has been verified… otherwise this alert could trigger many notifications.

For this example, we will create an alert to warn us each time a message sent on behalf of our customer bounces.

From the Alerts page, click ‘Create new alert’.

Real-Time Monitoring

Select the desired category the alert will apply to.
Check ‘Error on critical message’ and then click ‘Continue’.

Real-Time Monitoring

Enter a descriptive Alert name.

Under the Alert Definition section, select:

• Send me a:           Warning Message
• Each time a message:  bounces

Real-Time Monitoring

Select the notification channels, then click ‘Continue’.

Real-Time Monitoring

Review your alert settings, and click the ‘Create alert’ button.

Real-Time Monitoring

Your new alert will appear on the Alerts page.

Real-Time Monitoring

[top]

Edit Alerts

At any time, you can edit an existing alert.

From the Alerts tab, simply select Manage → Edit for the desired alert.

Real-Time Monitoring

Make the changes to your alert, then click ‘Continue’.

Real-Time Monitoring

Then click ‘Create Alert’ to save the changes.

Real-Time Monitoring

Duplicate Alerts

On the Alerts tab, select Manage → Duplicate for the campaign you want to duplicate.

Real-Time Monitoring

Enter the new alert name, and make the necessary changes.

Then click “Continue”.

Real-Time Monitoring

Review your new alert, then click ‘Create Alert’ to save your changes.

Real-Time Monitoring

[top]

Delete Alerts

Please be aware that once you delete an alert, it cannot be undone. If you wish to save your alert, you can simply turn off the email and slack notifications (alerts by default are always displayed on your dashboard).

To delete an alert, go to the ‘Alerts’ page, and select Manage → Delete. Then confirm the deletion from the pop-up window.

Real-Time Monitoring

Mute All Alerts

To stop your email, SMS, and Slack notifications for all your current active alerts, click the ‘Mute All Alerts’ button from any tab.

Real-Time Monitoring

All alert notifications - except for the Overview Dashboard - will be muted.

Real-Time Monitoring

To unmute the alerts, simply click the ‘Unmute Alerts’ link from any tab.

Real-Time Monitoring

Please note: New alerts created while the ‘Mute All Alerts’ is on, will not be muted.

[top]

Categories

Overview

Group your transactional emails that you want to monitor together into categories. A message can only belong to one category.

Your categories should reflect your business needs and can be defined in several ways, including:

  • Group emails with similar performances (e.g. new account confirmation emails have higher bounce rates than order confirmation emails)

  • Group emails with similar purposes (account activations, order confirmations, etc.)

  • Group higher business critical emails (i.e. emails that deal with monetary values or legal issues)

  • Group emails with similar sending patterns (e.g. separate weekly emails from emails that could be sent at any time)

Once your categories have been defined, a message property is added to the header of the transactional emails to enable the monitoring.

Categories can be defined in the Real-Time Monitoring Dashboard or via the API.

Let’s create a category from the Dashboard.

Create

From the ‘Categories’ page, click the ‘Create new category’ button.

Real-Time Monitoring

Enter your category name, then click ‘Save Category’.

Real-Time Monitoring

! Please note, that once a category has been created, its name cannot be changed. In the event you need to change the category name, you will need to delete the current category and create a new one.

Add & Test Custom Header

Once a category has been created, a developer resource will need to update the scripts of the associated transactional emails.

For each category created, a custom header must be added to the transactional email:

  • Send API: “MonitoringCategory”: “your_category_name_here”
  • SMTP: X-MJ-MonitoringCategory: your_category_name_here

(Developer Guides on Real-Time Monitoring can be found at dev.mailjet.com).

Once the header is added, send a test transactional email that will trigger an alert within that category. Once sent, you can then check your Overview Dashboard for the alert notification.

Delete Category

!! If any alerts are attached to the category, deleting the category will also delete the alerts within. Please note, once a category is deleted, it cannot be undone.

Go to the ‘Categories’ page. Check the category you want to delete, and click the delete icon. Then agree to the confirmation window.

Real-Time Monitoring

[top]

Notifications Channels

Alert Displays (Overview Tab)

You set how long you want alert notifications to be displayed in your Real-Time Overview Dashboard.

Real-Time Monitoring

Go to the Preferences tab, and select the desired display time.

Real-Time Monitoring

For example, if you select 12 hours, the Overview Dashboard will show all alerts in the last 12 hours.

Email Address Notifications

Manage up to 20 email addresses notification channels from the Preferences tab.

Real-Time Monitoring

To add a new email address, simply click the ‘Add address’ button then enter the new email address and desired label.

Real-Time Monitoring

For security reasons, each email address entered in the notification list will receive an invitation email containing a confirmation code. The recipient is asked to accept the invite by forwarding the email to you.

Enter the code to validate the email address. If you don’t receive the code right away, simply click ‘Do this later’.

Real-Time Monitoring

To validate an email address later, just select Manage → Confirm Email to have a new invitation and code sent to the email recipient. Once the recipient forwards you the email, enter the code.

Real-Time Monitoring

To edit the label for an existing email address, select Manage → Edit. (If you need to change the email address itself, please delete the address and then add it as a new email address.)

Real-Time Monitoring

To delete an address, select Manage → Delete for the desired email. To delete multiple addresses at once, click the checkbox for the addresses then click the delete icon (garbage can).

Real-Time Monitoring

[top]

Slack Channel Notifications

Manage your Slack notification channels (max. of 5 channels) from the Preferences Tab.

Real-Time Monitoring

Add a new Slack channel

Click the ‘Add slack channel’ button then enter the Slack webhook and optional label. (Learn how to get a Slack Channel Webhook).

Real-Time Monitoring

To edit the label for a Slack channel, select Manage → Edit. (If you need to change the Slack webhook URL itself, please delete the current channel and it a new one.)

Real-Time Monitoring

To delete a webhook and stop all notifications to that Slack room, select Manage → Delete for the desired webhook. To delete multiple webhooks, click the checkboxes then click the delete icon.

Real-Time Monitoring

[top]

Viewing Alert Notifications in Overview Tab

By default, the Overview Tab will show all your recent alert notifications.
(To change the display time of the Overview Tab, go to Preferences tab).

Real-Time Monitoring

Click on a notification….

Real-Time Monitoring

To view additional details such as the channels that were notified, the recipients affected, the cause of the issue, etc.

Real-Time Monitoring

Appendix A - Creating Slack Webhook

To add Slack as a notification channel, you first need to create a Slack webhook, which requires administrator rights in Slack.

Go to the Slack channel where you want the notifications to appear.
Click on the ‘Channel Settings → Add an app or integration’.

Real-Time Monitoring

In the new window, click on ‘Build…’.

Real-Time Monitoring

Under App Features, click ‘Incoming webhooks’.

Real-Time Monitoring

Then click on the ‘incoming webhook integration’ link.

Real-Time Monitoring

Simply click the ‘Add Incoming WebHooks integration’ button….

Real-Time Monitoring

And your generated webhook URL is ready!

Real-Time Monitoring

Just go back to the ‘Preferences’ tab in Real-Time Monitoring, and create your Slack Channel.

Real-Time Monitoring

[top]

Try Mailjet now ?
Create an account - no engagement, no hidden fees