diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dc231fa07ed2d..19ce5db963c39 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -249,6 +249,11 @@ datadog_checks_base/datadog_checks/base/checks/windows/ @DataDog/wi /authorize_net/metadata.csv @DataDog/saas-integrations @DataDog/documentation /authorize_net/assets/logs/ @DataDog/saas-integrations @DataDog/documentation @DataDog/logs-backend +/brevo/ @DataDog/saas-integrations +/brevo/*.md @DataDog/saas-integrations @DataDog/documentation +/brevo/manifest.json @DataDog/saas-integrations @DataDog/documentation +/brevo/assets/logs/ @DataDog/saas-integrations @DataDog/documentation @DataDog/logs-backend + /cisco_umbrella_dns/ @DataDog/saas-integrations /cisco_umbrella_dns/*.md @DataDog/saas-integrations @DataDog/documentation /cisco_umbrella_dns/manifest.json @DataDog/saas-integrations @DataDog/documentation diff --git a/.github/workflows/config/labeler.yml b/.github/workflows/config/labeler.yml index 5fa2b9bc4ffa9..1978013e24976 100644 --- a/.github/workflows/config/labeler.yml +++ b/.github/workflows/config/labeler.yml @@ -85,6 +85,8 @@ integration/azure_iot_edge: - azure_iot_edge/**/* integration/boundary: - boundary/**/* +integration/brevo: +- brevo/**/* integration/btrfs: - btrfs/**/* integration/cacti: diff --git a/brevo/CHANGELOG.md b/brevo/CHANGELOG.md new file mode 100644 index 0000000000000..764eff384da15 --- /dev/null +++ b/brevo/CHANGELOG.md @@ -0,0 +1,7 @@ +# CHANGELOG - Brevo + +## 1.0.0 / 2024-08-27 + +***Added***: + +* Initial Release diff --git a/brevo/README.md b/brevo/README.md new file mode 100644 index 0000000000000..098f88f3efe9e --- /dev/null +++ b/brevo/README.md @@ -0,0 +1,64 @@ +# Brevo + +## Overview + +[Brevo][1] is a cloud-based digital marketing platform designed for creating, sending, and tracking email campaigns, transactional emails, and more. It offers tools for automation and analytics, helping businesses optimize their email marketing strategies and monitor performance. + +Integrate Brevo with Datadog to gain insights into Brevo marketing campaign emails and track Brevo performance based on events and other transactional events using [webhooks][2]. + +## Setup + +Follow the instructions below to configure this integration for Brevo Marketing and Transactional events through a Webhook. + +### Configuration + +#### Webhook configuration for marketing events +Configure the Datadog endpoint to forward Brevo marketing events as logs to Datadog. For more details, see the Brevo [Marketing webhooks][3] documentation. + +1. Select an existing API key or create a new one by clicking one of the buttons below: +2. Log in to your [Brevo account][4]. +3. In the left-side panel, navigate to **Campaigns**. +4. Navigate to the **Settings** Page. +5. Under the **Webhooks** section, click **Configure**. +6. Click **Add a New Webhook**. +7. Enter the webhook URL that you identified previously. +8. Choose the types of messages and contact logs you want to forward to Datadog. +9. Click **Add**. + +#### Webhook configuration for transactional events +Configure the Datadog endpoint to forward Brevo transactional events as logs to Datadog. For more details, see the Brevo [Transactional webhooks][5] documentation. + +1. Select an existing API key or create a new one by clicking one of the buttons below: +2. Log in to your [Brevo account][4]. If you are already logged in, Brevo automatically redirects to the [Brevo homepage][6]. +3. In the left-side panel, navigate to **Transactional**. +4. In **Settings**, click "**Webhook**". +5. Click **Add a new webhook**. +6. Enter the webhook URL that you identified previously. +7. Select the types of message logs to forward to Datadog. +8. Click **Save**. + +## Data Collected + +### Logs +The Brevo integration forwards the marketing and transactional event logs to Datadog. + +### Metrics +Brevo does not include any metrics. + +### Service Checks +Brevo does not include any service checks. + +### Events +Brevo does not include any events. + +## Troubleshooting + +Need help? Contact [Datadog support][7]. + +[1]: https://www.brevo.com/products/marketing-platform/ +[2]: https://developers.brevo.com/docs/how-to-use-webhooks +[3]: https://developers.brevo.com/docs/marketing-webhooks +[4]: https://login.brevo.com/ +[5]: https://developers.brevo.com/docs/transactional-webhooks +[6]: https://app.brevo.com/ +[7]: https://docs.datadoghq.com/help/ diff --git a/brevo/assets/brevo.svg b/brevo/assets/brevo.svg new file mode 100644 index 0000000000000..a86cb89a46ded --- /dev/null +++ b/brevo/assets/brevo.svg @@ -0,0 +1,3 @@ + + + diff --git a/brevo/assets/dashboards/brevo_marketing_events.json b/brevo/assets/dashboards/brevo_marketing_events.json new file mode 100644 index 0000000000000..0789f2a571044 --- /dev/null +++ b/brevo/assets/dashboards/brevo_marketing_events.json @@ -0,0 +1,1078 @@ +{ + "title": "Brevo - Marketing Events", + "description": "This Dashboard provides a comprehensive analysis of the Brevo marketing events", + "widgets": [ + { + "id": 2074004104711888, + "definition": { + "type": "image", + "url": "https://www.brevo.com/_next/image/?url=https%3A%2F%2Fcorp-backend.brevo.com%2Fwp-content%2Fuploads%2F2023%2F12%2Fcover.webp&w=640&q=75", + "url_dark_theme": "https://www.brevo.com/_next/image/?url=https%3A%2F%2Fcorp-backend.brevo.com%2Fwp-content%2Fuploads%2F2023%2F04%2FLight-logo-cover-1.jpg&w=640&q=75", + "sizing": "cover", + "has_background": true, + "has_border": true, + "vertical_align": "center", + "horizontal_align": "center" + }, + "layout": { + "x": 0, + "y": 0, + "width": 6, + "height": 3 + } + }, + { + "id": 1383597922205404, + "definition": { + "title": "Emails Delivered", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "response_format": "scalar", + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:marketing-events @evt.name:delivered $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "conditional_formats": [ + { + "comparator": ">", + "value": 0, + "palette": "custom_bg", + "custom_bg_color": "#dbdef5" + } + ] + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "yaxis": { + "include_zero": true + }, + "type": "area" + } + }, + "layout": { + "x": 6, + "y": 0, + "width": 6, + "height": 3 + } + }, + { + "id": 8917290706883810, + "definition": { + "type": "note", + "content": "Gain better visibility into your email marketing performance by monitoring Brevo Marketing events with this dashboard.\n\nFor more information, see the [Brevo Integration Documentation](https://docs.datadoghq.com/integrations/brevo).\n\n**Tips**\n- Use the timeframe selector in the top right of the dashboard to change the default timeframe.\n- Clone this dashboard to rearrange, modify and add widgets and visualizations.\n", + "background_color": "green", + "font_size": "14", + "text_align": "left", + "vertical_align": "center", + "show_tick": true, + "tick_pos": "50%", + "tick_edge": "top", + "has_padding": true + }, + "layout": { + "x": 0, + "y": 3, + "width": 6, + "height": 3 + } + }, + { + "id": 7878012237089596, + "definition": { + "title": "Emails Opened", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "response_format": "scalar", + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:marketing-events @evt.name:opened $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "conditional_formats": [ + { + "comparator": ">", + "value": 0, + "palette": "black_on_light_green" + } + ] + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "yaxis": { + "include_zero": true + }, + "type": "area" + } + }, + "layout": { + "x": 6, + "y": 3, + "width": 6, + "height": 3 + } + }, + { + "id": 1554629846571348, + "definition": { + "title": "Email Event Trends: Spam, Bounces, and Unsubscribes", + "title_size": "16", + "title_align": "left", + "show_legend": true, + "legend_layout": "horizontal", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "style": { + "palette": "warm", + "palette_index": 3 + }, + "alias": "Hard Bounced", + "formula": "query1" + }, + { + "style": { + "palette": "orange", + "palette_index": 4 + }, + "alias": "Soft Bounced", + "formula": "query2" + }, + { + "style": { + "palette": "warm", + "palette_index": 0 + }, + "alias": "Marked as Spam", + "formula": "query3" + }, + { + "style": { + "palette": "warm", + "palette_index": 4 + }, + "alias": "Unsubscribed", + "formula": "query4" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:marketing-events @evt.name:hard_bounce $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query2", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:marketing-events @evt.name:soft_bounce $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query3", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:marketing-events @evt.name:spam $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query4", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:marketing-events @evt.name:unsubscribe $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "order_by": "values", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ] + }, + "layout": { + "x": 0, + "y": 6, + "width": 12, + "height": 5 + } + }, + { + "id": 897131023425208, + "definition": { + "title": "Email Open Activity ", + "title_size": "16", + "title_align": "left", + "show_legend": false, + "time": { + "type": "live", + "unit": "day", + "value": 1 + }, + "type": "heatmap", + "yaxis": { + "include_zero": true, + "scale": "linear", + "min": "auto", + "max": "auto" + }, + "requests": [ + { + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:marketing-events @evt.name:opened $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic" + } + } + ] + }, + "layout": { + "x": 0, + "y": 11, + "width": 7, + "height": 5 + } + }, + { + "id": 6836248737505238, + "definition": { + "title": "Most Clicked URLs", + "title_size": "16", + "title_align": "left", + "type": "query_table", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + }, + { + "facet": "@http.url", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:click $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "sort": { + "count": 100, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + }, + "formulas": [ + { + "cell_display_mode": "number", + "alias": "count", + "formula": "query1" + } + ] + } + ], + "has_search_bar": "auto" + }, + "layout": { + "x": 7, + "y": 11, + "width": 5, + "height": 5 + } + }, + { + "id": 8329971943698914, + "definition": { + "title": "Campaign Performance Summary", + "title_size": "16", + "title_align": "left", + "type": "query_table", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:delivered $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query2", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:opened $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query3", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:click $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query4", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:hard_bounce $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query5", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:soft_bounce $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query6", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:spam $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query7", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:unsubscribe $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "sort": { + "count": 70, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + }, + "formulas": [ + { + "cell_display_mode": "number", + "alias": "Delivered", + "formula": "query1" + }, + { + "cell_display_mode": "number", + "alias": "Opened", + "formula": "query2" + }, + { + "cell_display_mode": "number", + "alias": "Clicked", + "formula": "query3" + }, + { + "cell_display_mode": "number", + "alias": "Hard Bounced", + "formula": "query4" + }, + { + "cell_display_mode": "number", + "alias": "Soft Bounced", + "formula": "query5" + }, + { + "cell_display_mode": "number", + "alias": "Marked as Spam", + "formula": "query6" + }, + { + "cell_display_mode": "number", + "alias": "Unsubscribed", + "formula": "query7" + } + ] + } + ], + "has_search_bar": "auto" + }, + "layout": { + "x": 0, + "y": 16, + "width": 12, + "height": 4 + } + }, + { + "id": 991970123942130, + "definition": { + "title": "Most Engaged recipients", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@usr.email", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 0, + "y": 20, + "width": 6, + "height": 4 + } + }, + { + "id": 5154411203269646, + "definition": { + "title": "Most Opened Campaigns", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@campaign name", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:opened $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 6, + "y": 20, + "width": 6, + "height": 4 + } + }, + { + "id": 6281401150190870, + "definition": { + "title": "Top Reasons for Soft Bounce Events", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@reason", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:soft_bounce $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 0, + "y": 24, + "width": 4, + "height": 4 + } + }, + { + "id": 1122235000103890, + "definition": { + "title": "Top Reasons for Hard Bounce Events", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@reason", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:hard_bounce $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 4, + "y": 24, + "width": 4, + "height": 4 + } + }, + { + "id": 1499029347730738, + "definition": { + "title": "Top Reasons for Spam Events", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@reason", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:marketing-events @evt.name:spam $campaign_id $event_name $recipient_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 8, + "y": 24, + "width": 4, + "height": 4 + } + }, + { + "id": 3725343105146853, + "definition": { + "title": "Marketing Event List", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "response_format": "event_list", + "query": { + "data_source": "logs_stream", + "query_string": "source:brevo service:marketing-events $campaign_id $recipient_email $event_name", + "indexes": [], + "storage": "hot" + }, + "columns": [ + { + "field": "status_line", + "width": "auto" + }, + { + "field": "timestamp", + "width": "auto" + }, + { + "field": "@evt.name", + "width": "auto" + }, + { + "field": "@brevo.camp_id", + "width": "auto" + }, + { + "field": "@campaign name", + "width": "auto" + }, + { + "field": "@network.client.ip", + "width": "auto" + }, + { + "field": "@usr.email", + "width": "auto" + }, + { + "field": "@reason", + "width": "auto" + } + ] + } + ], + "type": "list_stream" + }, + "layout": { + "x": 0, + "y": 28, + "width": 12, + "height": 4 + } + } + ], + "template_variables": [ + { + "name": "event_name", + "prefix": "@evt.name", + "available_values": [], + "default": "*" + }, + { + "name": "recipient_email", + "prefix": "@usr.email", + "available_values": [], + "default": "*" + }, + { + "name": "campaign_id", + "prefix": "@brevo.camp_id", + "available_values": [], + "default": "*" + } + ], + "layout_type": "ordered", + "notify_list": [], + "reflow_type": "fixed" +} \ No newline at end of file diff --git a/brevo/assets/dashboards/brevo_transactional_events.json b/brevo/assets/dashboards/brevo_transactional_events.json new file mode 100644 index 0000000000000..fb748d8041820 --- /dev/null +++ b/brevo/assets/dashboards/brevo_transactional_events.json @@ -0,0 +1,1440 @@ +{ + "title": "Brevo - Transactional Events", + "description": "This Dashboard provides a comprehensive analysis of the Brevo transactional events", + "widgets": [ + { + "id": 7622028875118342, + "definition": { + "type": "image", + "url": "https://www.brevo.com/_next/image/?url=https%3A%2F%2Fcorp-backend.brevo.com%2Fwp-content%2Fuploads%2F2023%2F12%2Fcover.webp&w=640&q=75", + "url_dark_theme": "https://www.brevo.com/_next/image/?url=https%3A%2F%2Fcorp-backend.brevo.com%2Fwp-content%2Fuploads%2F2023%2F04%2FLight-logo-cover-1.jpg&w=640&q=75", + "sizing": "cover", + "has_background": true, + "has_border": true, + "vertical_align": "center", + "horizontal_align": "center" + }, + "layout": { + "x": 0, + "y": 0, + "width": 6, + "height": 3 + } + }, + { + "id": 7638012328352196, + "definition": { + "title": "Campaign Monitors Summary", + "type": "manage_status", + "display_format": "countsAndList", + "color_preference": "background", + "hide_zero_counts": true, + "show_status": true, + "last_triggered_format": "relative", + "query": "tag:brevo $subject $recipient_email $sender_email $event_name", + "sort": "status,asc", + "count": 50, + "start": 0, + "summary_type": "monitors", + "show_priority": false, + "show_last_triggered": false + }, + "layout": { + "x": 6, + "y": 0, + "width": 6, + "height": 6 + } + }, + { + "id": 2085088109137856, + "definition": { + "type": "note", + "content": "Gain better visibility into your transactional email performance by monitoring Brevo transactional event logs with this dashboard.\n\nFor more information, see the [Brevo Integration Documentation](https://docs.datadoghq.com/integrations/brevo).\n\n**Tips**\n- Use the timeframe selector in the top right of the dashboard to change the default timeframe.\n- Clone this dashboard to rearrange, modify and add widgets and visualizations.\n", + "background_color": "green", + "font_size": "14", + "text_align": "left", + "vertical_align": "center", + "show_tick": true, + "tick_pos": "50%", + "tick_edge": "top", + "has_padding": true + }, + "layout": { + "x": 0, + "y": 3, + "width": 6, + "height": 3 + } + }, + { + "id": 1921565840906662, + "definition": { + "title": "Emails Sent", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "response_format": "scalar", + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:request $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "conditional_formats": [ + { + "comparator": ">", + "value": 0, + "palette": "custom_bg", + "custom_bg_color": "#f5eee5" + } + ] + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "yaxis": { + "include_zero": true + }, + "type": "area" + } + }, + "layout": { + "x": 0, + "y": 6, + "width": 4, + "height": 3 + } + }, + { + "id": 1383597922205404, + "definition": { + "title": "Emails Delivered", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "response_format": "scalar", + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:delivered $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "conditional_formats": [ + { + "comparator": ">", + "value": 0, + "palette": "custom_bg", + "custom_bg_color": "#dbdef5" + } + ] + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "yaxis": { + "include_zero": true + }, + "type": "area" + } + }, + "layout": { + "x": 4, + "y": 6, + "width": 4, + "height": 3 + } + }, + { + "id": 4858909609907946, + "definition": { + "title": "Uniquely Opened Emails", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "response_format": "scalar", + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:unique_opened $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "conditional_formats": [ + { + "comparator": ">", + "value": 0, + "palette": "black_on_light_green" + } + ] + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "yaxis": { + "include_zero": true + }, + "type": "area" + } + }, + "layout": { + "x": 8, + "y": 6, + "width": 4, + "height": 3 + } + }, + { + "id": 1554629846571348, + "definition": { + "title": "Email Event Trends: Spam, Bounces, Unsubscribes, Errors and Blocks", + "title_size": "16", + "title_align": "left", + "show_legend": true, + "legend_layout": "horizontal", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "style": { + "palette": "classic", + "palette_index": 3 + }, + "alias": "Hard Bounced", + "formula": "query1" + }, + { + "style": { + "palette": "purple", + "palette_index": 1 + }, + "alias": "Soft Bounced", + "formula": "query2" + }, + { + "style": { + "palette": "classic", + "palette_index": 0 + }, + "alias": "Marked as Spam", + "formula": "query3" + }, + { + "style": { + "palette": "warm", + "palette_index": 1 + }, + "alias": "Unsubscribed", + "formula": "query4" + }, + { + "style": { + "palette": "warm", + "palette_index": 3 + }, + "alias": "Error", + "formula": "query5" + }, + { + "style": { + "palette": "warm", + "palette_index": 4 + }, + "alias": "Blocked", + "formula": "query6" + }, + { + "style": { + "palette": "gray", + "palette_index": 3 + }, + "alias": "Deferred", + "formula": "query7" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:hard_bounce $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query2", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:soft_bounce $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query3", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:spam $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query4", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:unsubscribed $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query5", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:invalid_email $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query6", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:blocked $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query7", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:deferred $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "order_by": "values", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ] + }, + "layout": { + "x": 0, + "y": 9, + "width": 12, + "height": 4 + } + }, + { + "id": 8329971943698914, + "definition": { + "title": "Email Performance Metrics by Subject", + "title_size": "16", + "title_align": "left", + "type": "query_table", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:request $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query12", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:unique_opened $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query2", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:delivered $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query3", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:opened $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query4", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:click $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query5", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:hard_bounce $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query6", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:soft_bounce $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query7", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:spam $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query8", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:unsubscribed $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query9", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:invalid_email $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query10", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:blocked $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query11", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:deferred $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "sort": { + "count": 120, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + }, + "formulas": [ + { + "cell_display_mode": "number", + "alias": "Sent", + "formula": "query1" + }, + { + "cell_display_mode": "number", + "alias": "Delivered", + "formula": "query2" + }, + { + "cell_display_mode": "number", + "alias": "Uniquely Opened", + "formula": "query12" + }, + { + "cell_display_mode": "number", + "alias": "Opened", + "formula": "query3" + }, + { + "cell_display_mode": "number", + "alias": "Clicked", + "formula": "query4" + }, + { + "cell_display_mode": "number", + "alias": "Hard Bounced", + "formula": "query5" + }, + { + "cell_display_mode": "number", + "alias": "Soft Bounced", + "formula": "query6" + }, + { + "cell_display_mode": "number", + "alias": "Spam", + "formula": "query7" + }, + { + "cell_display_mode": "number", + "alias": "Unsubscribed", + "formula": "query8" + }, + { + "cell_display_mode": "number", + "alias": "Error", + "formula": "query9" + }, + { + "cell_display_mode": "number", + "alias": "Blocked", + "formula": "query10" + }, + { + "cell_display_mode": "number", + "alias": "Deferred", + "formula": "query11" + } + ] + } + ], + "has_search_bar": "auto" + }, + "layout": { + "x": 0, + "y": 13, + "width": 12, + "height": 4 + } + }, + { + "id": 897131023425208, + "definition": { + "title": "Email Open Activity ", + "title_size": "16", + "title_align": "left", + "show_legend": false, + "time": { + "type": "live", + "unit": "day", + "value": 1 + }, + "type": "heatmap", + "yaxis": { + "include_zero": true, + "scale": "linear", + "min": "auto", + "max": "auto" + }, + "requests": [ + { + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:brevo service:transactional-events @evt.name:opened $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic" + } + } + ] + }, + "layout": { + "x": 0, + "y": 17, + "width": 6, + "height": 4 + } + }, + { + "id": 6836248737505238, + "definition": { + "title": "Most Clicked URLs", + "title_size": "16", + "title_align": "left", + "type": "query_table", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@http.url", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:click $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + }, + "formulas": [ + { + "cell_display_mode": "number", + "alias": "count", + "formula": "query1" + } + ] + } + ], + "has_search_bar": "auto" + }, + "layout": { + "x": 6, + "y": 17, + "width": 6, + "height": 4 + } + }, + { + "id": 991970123942130, + "definition": { + "title": "Most Engaged Recipients", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@usr.email", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 0, + "y": 21, + "width": 6, + "height": 4 + } + }, + { + "id": 3569244924085276, + "definition": { + "title": "Most Engaged Senders", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@sender_email", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 6, + "y": 21, + "width": 6, + "height": 4 + } + }, + { + "id": 6281401150190870, + "definition": { + "title": "Top Reasons for Soft Bounce Events", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@reason", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:soft_bounce $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 0, + "y": 25, + "width": 6, + "height": 4 + } + }, + { + "id": 1122235000103890, + "definition": { + "title": "Top Reasons for Hard Bounce Events", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@reason", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:hard_bounce $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 6, + "y": 25, + "width": 6, + "height": 4 + } + }, + { + "id": 5154411203269646, + "definition": { + "title": "Most Used Subjects", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 0, + "y": 29, + "width": 6, + "height": 4 + } + }, + { + "id": 5702461649653348, + "definition": { + "title": "Top Reasons for Deferred Events", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@reason", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:deferred $event_name $recipient_email $subject $sender_email" + }, + "storage": "hot" + } + ], + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "sort": { + "count": 10, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "style": { + "display": { + "type": "stacked", + "legend": "automatic" + } + } + }, + "layout": { + "x": 6, + "y": 29, + "width": 6, + "height": 4 + } + }, + { + "id": 1443743821978885, + "definition": { + "title": "Transactional Event List", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "response_format": "event_list", + "query": { + "data_source": "logs_stream", + "query_string": "source:brevo service:transactional-events $event_name $recipient_email $subject $sender_email", + "indexes": [], + "storage": "hot" + }, + "columns": [ + { + "field": "status_line", + "width": "auto" + }, + { + "field": "timestamp", + "width": "auto" + }, + { + "field": "@evt.name", + "width": "auto" + }, + { + "field": "@sender_email", + "width": "auto" + }, + { + "field": "@network.client.ip", + "width": "auto" + }, + { + "field": "@usr.email", + "width": "auto" + }, + { + "field": "@subject", + "width": "auto" + }, + { + "field": "@reason", + "width": "auto" + } + ] + } + ], + "type": "list_stream" + }, + "layout": { + "x": 0, + "y": 33, + "width": 12, + "height": 4 + } + } + ], + "template_variables": [ + { + "name": "event_name", + "prefix": "@evt.name", + "available_values": [], + "default": "*" + }, + { + "name": "sender_email", + "prefix": "@sender_email", + "available_values": [], + "default": "*" + }, + { + "name": "recipient_email", + "prefix": "@usr.email", + "available_values": [], + "default": "*" + }, + { + "name": "subject", + "prefix": "@subject", + "available_values": [], + "default": "*" + } + ], + "layout_type": "ordered", + "notify_list": [], + "reflow_type": "fixed" +} \ No newline at end of file diff --git a/brevo/assets/logs/brevo.yaml b/brevo/assets/logs/brevo.yaml new file mode 100644 index 0000000000000..d89f9cfdb293a --- /dev/null +++ b/brevo/assets/logs/brevo.yaml @@ -0,0 +1,277 @@ +id: brevo +metric_id: brevo +backend_only: false +facets: + - groups: + - Event + name: Event Name + path: evt.name + source: log + - groups: + - Web Access + name: URL Path + path: http.url + source: log + - groups: + - Web Access + name: URL Host + path: http.url_details.host + source: log + - groups: + - Web Access + name: URL Path + path: http.url_details.path + source: log + - groups: + - Web Access + name: URL Port + path: http.url_details.port + source: log + - groups: + - Web Access + name: URL scheme + path: http.url_details.scheme + source: log + - groups: + - Web Access + name: User-Agent + path: http.useragent + source: log + - groups: + - Web Access + name: Browser + path: http.useragent_details.browser.family + source: log + - groups: + - Web Access + name: Device + path: http.useragent_details.device.family + source: log + - groups: + - Web Access + name: OS + path: http.useragent_details.os.family + source: log + - groups: + - Geoip + name: City Name + path: network.client.geoip.city.name + source: log + - groups: + - Geoip + name: Continent Code + path: network.client.geoip.continent.code + source: log + - groups: + - Geoip + name: Continent Name + path: network.client.geoip.continent.name + source: log + - groups: + - Geoip + name: Country ISO Code + path: network.client.geoip.country.iso_code + source: log + - groups: + - Geoip + name: Country Name + path: network.client.geoip.country.name + source: log + - groups: + - Geoip + name: Subdivision ISO Code + path: network.client.geoip.subdivision.iso_code + source: log + - groups: + - Geoip + name: Subdivision Name + path: network.client.geoip.subdivision.name + source: log + - groups: + - Web Access + name: Client IP + path: network.client.ip + source: log + - groups: + - User + name: User Email + path: usr.email + source: log + - facetType: list + groups: + - Brevo + name: Campaign Id + path: brevo.camp_id + source: log + type: string +pipeline: + type: pipeline + name: Brevo + enabled: true + filter: + query: "source:brevo" + processors: + - type: attribute-remapper + name: Map `email` to `usr.email` + enabled: true + sources: + - email + sourceType: attribute + target: usr.email + targetType: attribute + preserveSource: false + overrideOnConflict: false + - type: attribute-remapper + name: Map `event` to `evt.name` + enabled: true + sources: + - event + sourceType: attribute + target: evt.name + targetType: attribute + preserveSource: false + overrideOnConflict: false + - type: attribute-remapper + name: Map `sending_ip` to `network.client.ip` + enabled: true + sources: + - sending_ip + sourceType: attribute + target: network.client.ip + targetType: attribute + preserveSource: false + overrideOnConflict: false + - type: geo-ip-parser + name: Extracting geolocation information from the client IP + enabled: true + sources: + - network.client.ip + target: network.client.geoip + ip_processing_behavior: do-nothing + - type: pipeline + name: Processing for transactional events + enabled: true + filter: + query: "service:transactional-events" + processors: + - type: attribute-remapper + name: Map `ts_epoch` to `timestamp` + enabled: true + sources: + - ts_epoch + sourceType: attribute + target: timestamp + targetType: attribute + preserveSource: false + overrideOnConflict: false + - type: attribute-remapper + name: Map `user_agent` to `http.useragent` + enabled: true + sources: + - user_agent + sourceType: attribute + target: http.useragent + targetType: attribute + preserveSource: false + overrideOnConflict: false + - type: attribute-remapper + name: Map `link` to `http.url` + enabled: true + sources: + - link + sourceType: attribute + target: http.url + targetType: attribute + preserveSource: false + overrideOnConflict: false + - name: Lookup for `evt.name` to `status` field + enabled: true + source: evt.name + target: status + lookupTable: |- + request,info + click,info + deferred,warning + delivered,Success + soft_bounce,warning + spam,warning + unique_opened,info + hard_bounce,error + opened,info + invalid_email,error + blocked,error + unsubscribed,warning + proxy_open,info + unique_proxy_open,info + type: lookup-processor + - type: user-agent-parser + name: Extracting user-agent information from the user-agent + enabled: true + sources: + - http.useragent + target: http.useragent_details + encoded: false + combineVersionDetails: false + - type: pipeline + name: Processing for marketing events + enabled: true + filter: + query: "service:marketing-events" + processors: + - type: arithmetic-processor + name: Convert `ts_event` from second to millisecond EPOCH UNIX format and map to + `timestamp` + enabled: true + expression: ts_event * 1000 + target: timestamp + replaceMissing: false + - type: attribute-remapper + name: Map `camp_id` to `brevo.camp_id` + enabled: true + sources: + - camp_id + sourceType: attribute + target: brevo.camp_id + targetType: attribute + preserveSource: false + overrideOnConflict: false + - type: attribute-remapper + name: Map `URL` to `http.url` + enabled: true + sources: + - URL + sourceType: attribute + target: http.url + targetType: attribute + preserveSource: false + overrideOnConflict: false + - name: Lookup for `evt.name` to `status` field + enabled: true + source: evt.name + target: status + lookupTable: |- + spam,warning + opened,info + click,info + hard_bounce,error + soft_bounce,warning + delivered,Success + unsubscribe,warning + type: lookup-processor + - type: date-remapper + name: Define `timestamp` as the official date of the log + enabled: true + sources: + - timestamp + - type: status-remapper + name: Define `status` as the official status of the log + enabled: true + sources: + - status + - type: url-parser + name: Extracting url-details from the url + enabled: true + sources: + - http.url + target: http.url_details + normalizeEndingSlashes: false diff --git a/brevo/assets/logs/brevo_tests.yaml b/brevo/assets/logs/brevo_tests.yaml new file mode 100644 index 0000000000000..a84951b0d4267 --- /dev/null +++ b/brevo/assets/logs/brevo_tests.yaml @@ -0,0 +1,1082 @@ +id: brevo +tests: + - sample: |- + { + "date_sent" : "2020-10-09 00:00:00", + "segment_ids" : [ 1, 10 ], + "date_event" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "opened", + "ts_event" : 1604933737, + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + result: + custom: + brevo: + camp_id: 1 + campaign name: "My First Campaign" + date_event: "2020-10-09 00:00:00" + date_sent: "2020-10-09 00:00:00" + evt: + name: "opened" + id: 11111 + segment_ids: + - 1 + - 10 + status: "info" + tag: "" + timestamp: 1.604933737E12 + ts: 1604937337 + ts_event: 1604933737 + ts_sent: 1604933619 + usr: + email: "example@domain.com" + message: |- + { + "date_sent" : "2020-10-09 00:00:00", + "segment_ids" : [ 1, 10 ], + "date_event" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "opened", + "ts_event" : 1604933737, + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + status: "info" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933737000 + - sample: |- + { + "date_sent" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "URL" : "https://myCampaignUrl.net", + "segment_ids" : [ 1, 10 ], + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "click", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + result: + custom: + brevo: + camp_id: 1 + campaign name: "My First Campaign" + date_event: "2020-10-09 00:00:00" + date_sent: "2020-10-09 00:00:00" + evt: + name: "click" + http: + url: "https://myCampaignUrl.net" + url_details: + host: "mycampaignurl.net" + path: "" + scheme: "https" + id: 11111 + segment_ids: + - 1 + - 10 + status: "info" + tag: "" + timestamp: 1.604933737E12 + ts: 1604937337 + ts_event: 1604933737 + ts_sent: 1604933619 + usr: + email: "example@domain.com" + message: |- + { + "date_sent" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "URL" : "https://myCampaignUrl.net", + "segment_ids" : [ 1, 10 ], + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "click", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + status: "info" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933737000 + - sample: |- + { + "reason" : "deferred", + "date_sent" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "hard_bounce", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + result: + custom: + brevo: + camp_id: 1 + campaign name: "My First Campaign" + date_event: "2020-10-09 00:00:00" + date_sent: "2020-10-09 00:00:00" + evt: + name: "hard_bounce" + id: 11111 + network: + client: + geoip: {} + ip: "10.10.10.10" + reason: "deferred" + status: "error" + tag: "" + timestamp: 1.604933737E12 + ts: 1604937337 + ts_event: 1604933737 + ts_sent: 1604933619 + usr: + email: "example@domain.com" + message: |- + { + "reason" : "deferred", + "date_sent" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "hard_bounce", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + status: "error" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933737000 + - sample: |- + { + "reason" : "deferred", + "date_sent" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "soft_bounce", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + result: + custom: + brevo: + camp_id: 1 + campaign name: "My First Campaign" + date_event: "2020-10-09 00:00:00" + date_sent: "2020-10-09 00:00:00" + evt: + name: "soft_bounce" + id: 11111 + network: + client: + geoip: {} + ip: "10.10.10.10" + reason: "deferred" + status: "warning" + tag: "" + timestamp: 1.604933737E12 + ts: 1604937337 + ts_event: 1604933737 + ts_sent: 1604933619 + usr: + email: "example@domain.com" + message: |- + { + "reason" : "deferred", + "date_sent" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "soft_bounce", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + status: "warn" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933737000 + - sample: |- + { + "date_sent" : "2020-10-09 00:00:00", + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "delivered", + "ts_event" : 1604933737, + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + result: + custom: + brevo: + camp_id: 1 + campaign name: "My First Campaign" + date_event: "2020-10-09 00:00:00" + date_sent: "2020-10-09 00:00:00" + evt: + name: "delivered" + id: 11111 + network: + client: + geoip: {} + ip: "10.10.10.10" + status: "Success" + tag: "" + timestamp: 1.604933737E12 + ts: 1604937337 + ts_event: 1604933737 + ts_sent: 1604933619 + usr: + email: "example@domain.com" + message: |- + { + "date_sent" : "2020-10-09 00:00:00", + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "campaign name" : "My First Campaign", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "delivered", + "ts_event" : 1604933737, + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + status: "ok" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933737000 + - sample: |- + { + "date_sent" : "2020-10-09 00:00:00", + "list_id" : [ 3, 42 ], + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "segment_ids" : [ 1, 10 ], + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "unsubscribe", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + result: + custom: + brevo: + camp_id: 1 + campaign name: "My First Campaign" + date_event: "2020-10-09 00:00:00" + date_sent: "2020-10-09 00:00:00" + evt: + name: "unsubscribe" + id: 11111 + list_id: + - 3 + - 42 + network: + client: + geoip: {} + ip: "10.10.10.10" + segment_ids: + - 1 + - 10 + status: "warning" + tag: "" + timestamp: 1.604933737E12 + ts: 1604937337 + ts_event: 1604933737 + ts_sent: 1604933619 + usr: + email: "example@domain.com" + message: |- + { + "date_sent" : "2020-10-09 00:00:00", + "list_id" : [ 3, 42 ], + "campaign name" : "My First Campaign", + "ts_event" : 1604933737, + "segment_ids" : [ 1, 10 ], + "sending_ip" : "10.10.10.10", + "date_event" : "2020-10-09 00:00:00", + "ts_sent" : 1604933619, + "camp_id" : 1, + "id" : 11111, + "tag" : "", + "event" : "unsubscribe", + "email" : "example@domain.com", + "ts" : 1604937337 + } + service: "marketing-events" + status: "warn" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933737000 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log/preview/22-ab68-900d1x9152c", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "request", + "ts_epoch" : 1604933654, + "email" : "example@domain.com", + "ts" : 1604933619 + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + contact_id: 8 + date: "2020-10-09 00:00:00" + evt: + name: "request" + id: 11111 + message-id: "2022283@abx.abc.com" + mirror_link: "https://app-smtp.brevo.com/log/preview/22-ab68-900d1x9152c" + network: + client: + geoip: {} + ip: "10.10.10.10" + status: "info" + subject: "My first Transactional" + tags: + - "transac_messages" + template_id: 22 + timestamp: 1604933654 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log/preview/22-ab68-900d1x9152c", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "request", + "ts_epoch" : 1604933654, + "email" : "example@domain.com", + "ts" : 1604933619 + } + service: "transactional-events" + status: "info" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933654 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "link" : "https://abdomain.com/product", + "device_used" : "DESKTOP", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log/preview/jj", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "click", + "ts_epoch" : 1604933654, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + contact_id: 8 + date: "2020-10-09 00:00:00" + device_used: "DESKTOP" + evt: + name: "click" + http: + url: "https://abdomain.com/product" + url_details: + host: "abdomain.com" + path: "/product" + scheme: "https" + useragent: "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" + useragent_details: + browser: + family: "GmailImageProxy" + device: + category: "Desktop" + family: "Other" + os: + family: "Windows" + major: "XP" + id: 11111 + message-id: "2022283@abx.abc.com" + mirror_link: "https://app-smtp.brevo.com/log/preview/jj" + network: + client: + geoip: {} + ip: "10.10.10.10" + status: "info" + subject: "My first Transactional" + tags: + - "transac_messages" + template_id: 22 + timestamp: 1604933654 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "link" : "https://abdomain.com/product", + "device_used" : "DESKTOP", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log/preview/jj", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "click", + "ts_epoch" : 1604933654, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + status: "info" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933654 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "reason" : "spam", + "subject" : "My first Transactional", + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "deferred", + "ts_epoch" : 1604933654, + "email" : "example@domain.com", + "ts" : 1604933619 + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + date: "2020-10-09 00:00:00" + evt: + name: "deferred" + id: 11111 + message-id: "2022283@abx.abc.com" + network: + client: + geoip: {} + ip: "10.10.10.10" + reason: "spam" + status: "warning" + subject: "My first Transactional" + tags: + - "transac_messages" + template_id: 22 + timestamp: 1604933654 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "reason" : "spam", + "subject" : "My first Transactional", + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "deferred", + "ts_epoch" : 1604933654, + "email" : "example@domain.com", + "ts" : 1604933619 + } + service: "transactional-events" + status: "warn" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933654 + - sample: |- + { + "date" : "2024-10-03 11:29:38", + "reason" : "sent", + "subject" : "test", + "ts_event" : 1727935178, + "sending_ip" : "10.10.10.10", + "service" : "transactional-events", + "message-id" : "<20.21@s-ry.mn.fr>", + "template_id" : 27, + "id" : 1141551, + "tag" : "", + "event" : "delivered", + "ts_epoch" : 1727935178000, + "email" : "abc@test.com", + "ts" : 1727935178, + "sender_email" : "abc@test.py" + } + service: "transactional-events" + result: + custom: + date: "2024-10-03 11:29:38" + evt: + name: "delivered" + id: 1141551 + message-id: "<20.21@s-ry.mn.fr>" + network: + client: + geoip: {} + ip: "10.10.10.10" + reason: "sent" + sender_email: "abc@test.py" + service: "transactional-events" + status: "Success" + subject: "test" + tag: "" + template_id: 27 + timestamp: 1727935178000 + ts: 1727935178 + ts_event: 1727935178 + usr: + email: "abc@test.com" + message: |- + { + "date" : "2024-10-03 11:29:38", + "reason" : "sent", + "subject" : "test", + "ts_event" : 1727935178, + "sending_ip" : "10.10.10.10", + "service" : "transactional-events", + "message-id" : "<20.21@s-ry.mn.fr>", + "template_id" : 27, + "id" : 1141551, + "tag" : "", + "event" : "delivered", + "ts_epoch" : 1727935178000, + "email" : "abc@test.com", + "ts" : 1727935178, + "sender_email" : "abc@test.py" + } + service: "transactional-events" + status: "ok" + tags: + - "source:LOGS_SOURCE" + timestamp: 1727935178000 + - sample: |- + { + "date" : "2024-10-03 11:30:46", + "reason" : "Unable to find MX of domain jbsjjsd.com", + "subject" : "test", + "ts_event" : 1727935246, + "sending_ip" : "10.10.10.10", + "service" : "transactional-events", + "message-id" : "<20.211@s-rey.mn.r>", + "template_id" : 27, + "id" : 1141551, + "tag" : "", + "event" : "soft_bounce", + "ts_epoch" : 1727935246000, + "email" : "adss@jbsjjsd.com", + "ts" : 1727935246, + "sender_email" : "test@abc.com" + } + service: "transactional-events" + result: + custom: + date: "2024-10-03 11:30:46" + evt: + name: "soft_bounce" + id: 1141551 + message-id: "<20.211@s-rey.mn.r>" + network: + client: + geoip: {} + ip: "10.10.10.10" + reason: "Unable to find MX of domain jbsjjsd.com" + sender_email: "test@abc.com" + service: "transactional-events" + status: "warning" + subject: "test" + tag: "" + template_id: 27 + timestamp: 1727935246000 + ts: 1727935246 + ts_event: 1727935246 + usr: + email: "adss@jbsjjsd.com" + message: |- + { + "date" : "2024-10-03 11:30:46", + "reason" : "Unable to find MX of domain jbsjjsd.com", + "subject" : "test", + "ts_event" : 1727935246, + "sending_ip" : "10.10.10.10", + "service" : "transactional-events", + "message-id" : "<20.211@s-rey.mn.r>", + "template_id" : 27, + "id" : 1141551, + "tag" : "", + "event" : "soft_bounce", + "ts_epoch" : 1727935246000, + "email" : "adss@jbsjjsd.com", + "ts" : 1727935246, + "sender_email" : "test@abc.com" + } + service: "transactional-events" + status: "warn" + tags: + - "source:LOGS_SOURCE" + timestamp: 1727935246000 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "device_used" : "DESKTOP", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log/preview/1a2000f4-4e33-23aa-ab68-900d1x9152c", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "unique_opened", + "ts_epoch" : 1604933623, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + contact_id: 8 + date: "2020-10-09 00:00:00" + device_used: "DESKTOP" + evt: + name: "unique_opened" + http: + useragent: "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" + useragent_details: + browser: + family: "GmailImageProxy" + device: + category: "Desktop" + family: "Other" + os: + family: "Windows" + major: "XP" + id: 11111 + message-id: "2022283@abx.abc.com" + mirror_link: "https://app-smtp.brevo.com/log/preview/1a2000f4-4e33-23aa-ab68-900d1x9152c" + network: + client: + geoip: {} + ip: "10.10.10.10" + status: "info" + subject: "My first Transactional" + tags: + - "transac_messages" + template_id: 22 + timestamp: 1604933623 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "device_used" : "DESKTOP", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log/preview/1a2000f4-4e33-23aa-ab68-900d1x9152c", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "unique_opened", + "ts_epoch" : 1604933623, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + status: "info" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933623 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "blocked", + "ts_epoch" : 1604933623, + "ts_event" : 1604933654, + "email" : "example@domain.com", + "ts" : 1604933619, + "tags" : [ "transac_messages" ] + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + date: "2020-10-09 00:00:00" + evt: + name: "blocked" + id: 11111 + message-id: "2022283@abx.abc.com" + status: "error" + subject: "My first Transactional" + tags: + - "transac_messages" + template_id: 22 + timestamp: 1604933623 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "blocked", + "ts_epoch" : 1604933623, + "ts_event" : 1604933654, + "email" : "example@domain.com", + "ts" : 1604933619, + "tags" : [ "transac_messages" ] + } + service: "transactional-events" + status: "error" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933623 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "device_used" : "DESKTOP", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "opened", + "ts_epoch" : 1604933623, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + contact_id: 8 + date: "2020-10-09 00:00:00" + device_used: "DESKTOP" + evt: + name: "opened" + http: + useragent: "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" + useragent_details: + browser: + family: "GmailImageProxy" + device: + category: "Desktop" + family: "Other" + os: + family: "Windows" + major: "XP" + id: 11111 + message-id: "2022283@abx.abc.com" + mirror_link: "https://app-smtp.brevo.com/log" + network: + client: + geoip: {} + ip: "10.10.10.10" + status: "info" + subject: "My first Transactional" + tags: + - "transac_messages" + template_id: 22 + timestamp: 1604933623 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first Transactional", + "device_used" : "DESKTOP", + "contact_id" : 8, + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "mirror_link" : "https://app-smtp.brevo.com/log", + "sending_ip" : "10.10.10.10", + "message-id" : "2022283@abx.abc.com", + "template_id" : 22, + "id" : 11111, + "event" : "opened", + "ts_epoch" : 1604933623, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + status: "info" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933623 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "reason" : "server is down", + "subject" : "My first Transactional", + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "sending_ip" : "10.10.10.10", + "message-id" : "12.5787683@abc.domain.com", + "template_id" : 22, + "id" : 11111, + "event" : "hard_bounce", + "ts_epoch" : 1604933653, + "email" : "example@domain.com", + "ts" : 1604933619 + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + date: "2020-10-09 00:00:00" + evt: + name: "hard_bounce" + id: 11111 + message-id: "12.5787683@abc.domain.com" + network: + client: + geoip: {} + ip: "10.10.10.10" + reason: "server is down" + status: "error" + subject: "My first Transactional" + tags: + - "transac_messages" + template_id: 22 + timestamp: 1604933653 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "reason" : "server is down", + "subject" : "My first Transactional", + "ts_event" : 1604933654, + "tags" : [ "transac_messages" ], + "sending_ip" : "10.10.10.10", + "message-id" : "12.5787683@abc.domain.com", + "template_id" : 22, + "id" : 11111, + "event" : "hard_bounce", + "ts_epoch" : 1604933653, + "email" : "example@domain.com", + "ts" : 1604933619 + } + service: "transactional-events" + status: "error" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933653 + - sample: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first transactional", + "device_used" : "MOBILE", + "contact_id" : 8, + "ts_event" : 1604933654, + "mirror_link" : "https://app-smtp.brevo.com/log/preview/1a200", + "sending_ip" : "10.10.10.10", + "message-id" : "201798300811.5787683@abs.domain.com", + "template_id" : 22, + "id" : 11111, + "tag" : "[\"transactionalTag\"]", + "event" : "unsubscribed", + "ts_epoch" : 1604933623, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + result: + custom: + X-Mailin-custom: "some_custom_header" + contact_id: 8 + date: "2020-10-09 00:00:00" + device_used: "MOBILE" + evt: + name: "unsubscribed" + http: + useragent: "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)" + useragent_details: + browser: + family: "GmailImageProxy" + device: + category: "Desktop" + family: "Other" + os: + family: "Windows" + major: "XP" + id: 11111 + message-id: "201798300811.5787683@abs.domain.com" + mirror_link: "https://app-smtp.brevo.com/log/preview/1a200" + network: + client: + geoip: {} + ip: "10.10.10.10" + status: "warning" + subject: "My first transactional" + tag: "[\"transactionalTag\"]" + template_id: 22 + timestamp: 1604933623 + ts: 1604933619 + ts_event: 1604933654 + usr: + email: "example@domain.com" + message: |- + { + "date" : "2020-10-09 00:00:00", + "X-Mailin-custom" : "some_custom_header", + "subject" : "My first transactional", + "device_used" : "MOBILE", + "contact_id" : 8, + "ts_event" : 1604933654, + "mirror_link" : "https://app-smtp.brevo.com/log/preview/1a200", + "sending_ip" : "10.10.10.10", + "message-id" : "201798300811.5787683@abs.domain.com", + "template_id" : 22, + "id" : 11111, + "tag" : "[\"transactionalTag\"]", + "event" : "unsubscribed", + "ts_epoch" : 1604933623, + "email" : "example@domain.com", + "user_agent" : "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)", + "ts" : 1604933619 + } + service: "transactional-events" + status: "warn" + tags: + - "source:LOGS_SOURCE" + timestamp: 1604933623 \ No newline at end of file diff --git a/brevo/assets/monitors/brevo_high_block_rate_by_subject.json b/brevo/assets/monitors/brevo_high_block_rate_by_subject.json new file mode 100644 index 0000000000000..f117e49ae2199 --- /dev/null +++ b/brevo/assets/monitors/brevo_high_block_rate_by_subject.json @@ -0,0 +1,92 @@ +{ + "version": 2, + "created_at": "2024-09-11", + "last_updated_at": "2024-09-11", + "title": "High Block Rate by Subject", + "description": "This monitor alerts when block rates for transactional emails by subject line are higher than usual. A high block rate may indicate that unsubscribed recipients are still receiving emails. This monitor helps to identify and resolve problems to improve the deliverability of transactional messages.", + "definition": { + "id": 152860279, + "name": "High Block Rate by Subject", + "type": "log alert", + "query": "formula(\"(query / query1) * 100\").last(\"1d\") > 10", + "message": "{{#is_warning}} \nThe block rate for subject '{{log.attributes.subject}}' has exceeded the threshold. \nCurrent Block Rate: {{value}}% \nThreshold: {{warn_threshold}}% \n{{/is_warning}}\n\n{{#is_alert}} \nThe block rate for subject '{{log.attributes.subject}}' has exceeded the threshold. \nCurrent Block Rate: {{value}}% \nThreshold: {{threshold}}% \n{{/is_alert}}\n\n\n@example@abc.com", + "tags": [ + "brevo" + ], + "options": { + "thresholds": { + "critical": 10, + "warning": 5 + }, + "enable_logs_sample": false, + "notify_audit": false, + "on_missing_data": "default", + "include_tags": false, + "variables": [ + { + "data_source": "logs", + "name": "query", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:blocked" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:request" + }, + "storage": "hot" + } + ], + "notify_by": [ + "*" + ], + "new_group_delay": 0, + "renotify_interval": 0, + "escalation_message": "", + "groupby_simple_monitor": false, + "silenced": {} + }, + "priority": null, + "restriction_policy": { + "bindings": [] + } + }, + "tags": [ + "integration:brevo" + ] +} \ No newline at end of file diff --git a/brevo/assets/monitors/brevo_high_bounce_rate_by_subject.json b/brevo/assets/monitors/brevo_high_bounce_rate_by_subject.json new file mode 100644 index 0000000000000..45a217b69cf19 --- /dev/null +++ b/brevo/assets/monitors/brevo_high_bounce_rate_by_subject.json @@ -0,0 +1,90 @@ +{ + "version": 2, + "created_at": "2024-09-11", + "last_updated_at": "2024-09-11", + "title": "High Bounce Rate by Subject", + "description": "This monitor tracks bounce rates for transactional emails by subject line. High bounce rates may indicate invalid addresses or server issues. Use this monitor to help identify and resolve problems to improve the deliverability of transactional messages.", + "definition": { + "id": 152853564, + "name": "High Bounce Rate by Subject", + "type": "log alert", + "query": "formula(\"(query / query1) * 100\").last(\"1d\") > 10", + "message": "{{#is_warning}} \nThe bounce rate for subject '{{log.attributes.subject}}' has exceeded the threshold. \nCurrent Bounce Rate: {{value}}% \nThreshold: {{warn_threshold}}% \n{{/is_warning}}\n\n{{#is_alert}} \nThe bounce rate for subject '{{log.attributes.subject}}' has exceeded the threshold. \nCurrent Bounce Rate: {{value}}% \nThreshold: {{threshold}}% \n{{/is_alert}}\n\n\n@example@abc.com", + "tags": [ + "brevo" + ], + "options": { + "thresholds": { + "critical": 10, + "warning": 5 + }, + "enable_logs_sample": false, + "notify_audit": false, + "on_missing_data": "default", + "include_tags": false, + "variables": [ + { + "data_source": "logs", + "name": "query", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:(hard_bounce OR soft_bounce)" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:request" + }, + "storage": "hot" + } + ], + "new_group_delay": 0, + "notify_by": [ + "*" + ], + "groupby_simple_monitor": false, + "silenced": {} + }, + "priority": null, + "restriction_policy": { + "bindings": [] + } + }, + "tags": [ + "integration:brevo" + ] +} \ No newline at end of file diff --git a/brevo/assets/monitors/brevo_high_error_rate_by_subject.json b/brevo/assets/monitors/brevo_high_error_rate_by_subject.json new file mode 100644 index 0000000000000..05c3bc064e4ab --- /dev/null +++ b/brevo/assets/monitors/brevo_high_error_rate_by_subject.json @@ -0,0 +1,91 @@ +{ + "version": 2, + "created_at": "2024-09-11", + "last_updated_at": "2024-09-11", + "title": "High Error Rate by Subject", + "description": "Alerts when error rates for transactional emails by subject line are higher than usual. High error rates may indicate issues with content or recipient details. This monitor helps to identify and address problems to ensure reliable delivery of transactional emails.", + "definition": { + "id": 152943106, + "name": "High Error Rate by Subject", + "type": "log alert", + "query": "formula(\"(query / query1) * 100\").last(\"1d\") > 10", + "message": "{{#is_warning}} \nThe error rate for subject '{{log.attributes.subject}}' has exceeded the threshold. \nCurrent Error Rate: {{value}}% \nThreshold: {{warn_threshold}}% \n{{/is_warning}}\n\n{{#is_alert}} \nThe error rate for subject '{{log.attributes.subject}}' has exceeded the threshold. \nCurrent Error Rate: {{value}}% \nThreshold: {{threshold}}% \n{{/is_alert}}\n\n\n@example@abc.com", + "tags": [ + "brevo" + ], + "options": { + "thresholds": { + "critical": 10, + "warning": 5 + }, + "enable_logs_sample": false, + "notify_audit": false, + "on_missing_data": "default", + "include_tags": false, + "variables": [ + { + "data_source": "logs", + "name": "query", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:invalid_email" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@subject", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:brevo service:transactional-events @evt.name:request" + }, + "storage": "hot" + } + ], + "notify_by": [ + "*" + ], + "new_group_delay": 0, + "renotify_interval": 0, + "escalation_message": "", + "silenced": {} + }, + "priority": null, + "restriction_policy": { + "bindings": [] + } + }, + "tags": [ + "integration:brevo" + ] +} \ No newline at end of file diff --git a/brevo/assets/service_checks.json b/brevo/assets/service_checks.json new file mode 100644 index 0000000000000..fe51488c7066f --- /dev/null +++ b/brevo/assets/service_checks.json @@ -0,0 +1 @@ +[] diff --git a/brevo/images/brevo_marketing_events.png b/brevo/images/brevo_marketing_events.png new file mode 100644 index 0000000000000..179ce85362c2d Binary files /dev/null and b/brevo/images/brevo_marketing_events.png differ diff --git a/brevo/images/brevo_transactional_events.png b/brevo/images/brevo_transactional_events.png new file mode 100644 index 0000000000000..6646cc61c6ade Binary files /dev/null and b/brevo/images/brevo_transactional_events.png differ diff --git a/brevo/manifest.json b/brevo/manifest.json new file mode 100644 index 0000000000000..5512abd8d0365 --- /dev/null +++ b/brevo/manifest.json @@ -0,0 +1,62 @@ +{ + "manifest_version": "2.0.0", + "app_uuid": "df939a65-33b7-4bc8-848f-bfe65c022332", + "app_id": "brevo", + "display_on_public_website": false, + "tile": { + "overview": "README.md#Overview", + "configuration": "README.md#Setup", + "support": "README.md#Support", + "changelog": "CHANGELOG.md", + "description": "Gain insights into Brevo marketing and transactional events.", + "title": "Brevo", + "media": [ + { + "caption": "Brevo - Transactional Events", + "image_url": "images/brevo_transactional_events.png", + "media_type": "image" + }, + { + "caption": "Brevo - Marketing Events", + "image_url": "images/brevo_marketing_events.png", + "media_type": "image" + } + ], + "classifier_tags": [ + "Category::Log Collection", + "Submitted Data Type::Logs", + "Offering::Integration" + ] + }, + "assets": { + "integration": { + "auto_install": false, + "source_type_id": 24822827, + "source_type_name": "Brevo", + "events": { + "creates_events": false + }, + "service_checks": { + "metadata_path": "assets/service_checks.json" + } + }, + "dashboards": { + "Brevo - Transactional Events" : "assets/dashboards/brevo_transactional_events.json", + "Brevo - Marketing Events" : "assets/dashboards/brevo_marketing_events.json" + }, + "logs": { + "source": "brevo" + }, + "monitors": { + "High Block Rate by Subject" : "assets/monitors/brevo_high_block_rate_by_subject.json", + "High Bounce Rate by Subject" : "assets/monitors/brevo_high_bounce_rate_by_subject.json", + "High Error Rate by Subject" : "assets/monitors/brevo_high_error_rate_by_subject.json" + } + }, + "author": { + "support_email": "help@datadoghq.com", + "name": "Datadog", + "homepage": "https://www.datadoghq.com", + "sales_email": "info@datadoghq.com" + } +}