Skip to main content

Mailgun

Thumbnail icon

The Mailgun app for Sumo Logic enables you to seamlessly monitor email system performance and user interactions through two comprehensive dashboards. The provided dashboard empowers you to analyze and optimize email delivery by monitoring event trends, identifying errors, understanding client behaviour, and tracking event geolocation data, ensuring efficient email management and an enhanced user experience. Meanwhile, the dashboard also offers a holistic view of email delivery, allowing you to track issues, complaint patterns, and geographic trends in events and complaints, facilitating effective email management and optimization.

Mailgun is an email delivery service for sending, receiving, and tracking emails. You can use a webhook in the Mailgun platform to forward inbound and outbound email events to the Sumo Logic HTTP endpoint. Using these logs, you can monitor the entire email communication lifecycle, events such as accepted, rejected, delivered, and failed messages, as well as recipient interactions like opened, clicked, unsubscribed, and complained events in Sumo Logic. For more details, refer to the Mailgun Documentation.

Event types​

The Sumo Logic integration for Mailgun ingests email events into Sumo Logic through an outgoing webhook available in Mailgun. For more information on supported events that are ingested through the Mailgun webhook, see the Mailgun Documentation.

Sample log messages​

{
"signature": {
"token": "b30b54697f3c4c8f8e810ee1e6012cc25b93a0b006aedd9ea5",
"timestamp": 1698262699,
"signature": ""
},
"event-data": {
"id": "Ase7i2zsRYeDXztHGENqRA",
"timestamp": 1698262699.873676,
"log-level": "info",
"event": "clicked",
"message": {
"headers": {
"message-id": "16982626991826.18666.16540@sandbox6dc4471342a54f23b39d0b8be5621130.mailgun.org"
}
},
"recipient": "win7mailer411@mxil.com",
"recipient-domain": "example.com",
"ip": "72.66.105.242",
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco"
},
"client-info": {
"client-os": "Linux",
"device-type": "desktop",
"client-name": "Chrome",
"client-type": "browser",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31"
},
"campaigns": [

],
"tags": [
"my_tag_1",
"my_tag_2"
],
"user-variables": {
"my_var_1": "Mailgun Variable #1",
"my-var-2": "awesome"
}
}
}

Sample query​

_sourceCategory="webhook/mailgun"
| json "event-data.id", "event-data.event", "event-data.log-level" as id, event, loglevel nodrop
| where event matches "{{event}}" and loglevel matches "{{logLevel}}"
| count

Setup​

This section has instructions for collecting logs for the Sumo Logic Mailgun webhook collection.

Source configuration​

Follow the below steps to configure the Hosted Collector to receive Mailgun events:

  1. In the Sumo Logic portal, create a new Hosted Collector or use an existing one. Then add an HTTP Logs and Metrics Source.
  2. Configure Source Category in the HTTP source - for example, webhook/mailgun - for the Mailgun integration.
  3. Copy and save the endpoint URL of the source.

Vendor configuration​

Configure the webhook integration in Mailgun to send events to the Sumo Logic HTTP source. Once configured, it will be triggered each time any email events occur within your Mailgun account.

Follow the below steps to configure the Mailgun webhook.

  1. Sign in to the Mailgun account.
  2. Under Sending section move to the Webhooks option.
  3. Click Add Webhook. The webhook form appears.
  4. Enter webhook form data as follows:
    • Event Types. Select the event types for which you want to send notifications to Sumo Logic.
    • URL. Enter the Sumo Logic HTTP endpoint URL (source address) created above.
  5. Click Create Webhook.
  6. Verify Mailgun events are getting ingested in Sumo Logic by executing the following query on Sumo Logic's Log Search panel.
`_sourceCategory=webhook/mailgun`
info

Installing the Mailgun app​

To install the app, do the following:

  1. From the Sumo Logic navigation, select App Catalog.
  2. In the Search Apps field, search for and then select your app.
    Optionally, you can scroll down to preview the dashboards included with the app.
  3. To install the app, click Install App.
  4. Click Next in the Setup Data section.
  5. In the Configure section of the respective app, complete the following fields.
    1. Key. Select either of these options for the data source.
      • Choose Source Category, and select a source category from the list for Default Value.
      • Choose Custom, and enter a custom metadata field. Insert its value in Default Value.
  6. Click Next. You will be redirected to the Preview & Done section.

Your app will be installed in the Installed Apps folder and dashboard panels will start to fill automatically.

Each panel slowly fills with data matching the time range query and received since the panel was created. Results will not immediately be available, updating with full graphs and charts over time.

Viewing Mailgun dashboards​

All dashboards have a set of filters that you can apply to the entire dashboard. Use these filters to drill down and examine the data to a granular level.

  • You can change the time range for a dashboard or panel by selecting a predefined interval from a drop-down list, choosing a recently used time range, or specifying custom dates and times. Learn more.
  • You can use template variables to drill down and examine the data on a granular level. For more information, see Filter with template variables.
  • Most Next-Gen apps allow you to provide the scope at the installation time and are comprised of a key (_sourceCategory by default) and a default value for this key. Based on your input, the app dashboards will be parameterized with a dashboard variable, allowing you to change the dataset queried by all panels. This eliminates the need to create multiple copies of the same dashboard with different queries.

Overview​

The Mailgun - Overview dashboard offers a comprehensive overview of email system performance and user interactions, featuring panels that include Log Level, Total Events, Total Error Events, Log Level Trends, Event Type, Event Trends, Top Sender, Top Recipient, Top Subject, Client OS, Client Device Type, Client Type, Client Name, Event Geolocation, and Recent Event Summary. This dashboard empowers Mailgun users to analyze and optimize email delivery by monitoring event trends, identifying errors, understanding client behavior, and tracking event geolocation data, ensuring efficient email management and enhanced user experience.

Mailgun - Overview

Failed, Complained Events​

The Mailgun - Failed, Complained Events dashboard offers a holistic view of email system performance and user interactions, featuring panels like Failed Events, Severity, Top Failure Codes, Top Failure Reasons, Top Sender and Recipient for Failure Events, Recent Failed Events, Complained Events, Top Sender and Recipient for Complained Events, Top Subject for Complained Events, Event Geolocation, and Recent Complained Events. This dashboard equips Mailgun users to closely monitor email delivery, assess issues, understand complaint patterns, and track geographic trends in events and complaints, facilitating effective email management and optimization.

Mailgun - Failed, Complained Events
Status
Legal
Privacy Statement
Terms of Use

Copyright Β© 2024 by Sumo Logic, Inc.