Microsoft Teams Trigger Outputs and Integrations

George Alpizar
George Alpizar
  • Updated

Overview

This output type streams notifications and alerts to a specified Teams channel.


Review Parameters

Review the following parameters that you can configure in the Edge Delta App:

Visual Editor YAML Description
Name name

Enter a descriptive name for the output or integration.

For outputs, this name will be used to map this destination to a workflow.

This parameter is required. 

Review the following example: 

name: microsoft-teams-integration
Integration integration_name

This parameter only appears when you create an individual output.

This parameter refers to the organization-level integration created in the Integrations page. If you enter this name, then the rest of the fields will be automatically populated.

If you need to add multiple instances of the same integration into the config, then you can add a custom name to each instance via the name field. In this situation, the name should be used to refer to the specific instance of the destination in the workflows.

This parameter is optional. 

Review the following example: 

integration_name: ed-alert-teams
Not applicable  type

Enter teams.

This parameter is required. 

Review the following example: 

type: teams
Endpoint endpoint

Enter the Microsoft Teams webhook URL.

This parameter is required. 

Review the following example: 

endpoint: "https://outlook.office.com/webhookb2/XX-XX-XX-XX-XX@XX-XX-XX-XX-XX/IncomingWebhook/XX/XX-XX-XX-XX"
Suppression Window suppression_window

Enter a golang duration string that represents the suppression window. Once the agent detects an issue and notifies the endpoint, the agent will suppress any new issues for this time period.

The default setting is 20m.

This parameter is optional. 

Review the following example: 

suppression_window: 30m
Suppression Mode suppression_mode

Enter a suppression mode, which can be local or global.

The default mode is local, which indicates that an individual agent suppresses an issue if the agent has already made a local notification for a similar issue in the last suppression window.

Global mode indicates that an individual agent checks with the Edge Delta backend to see if there were similar alerts from other sibling agents (agents that share the same tag in the configuration).

This parameter is optional. 

Review the following example: 

suppression_mode: local
Title

notify_content:

  title:

Enter a descriptive title for the notification. 

You can use this parameter to customize the notification content. This parameter supports templating.

To learn more, see Review Notify Content Parameters.

This parameter is optional. 

Review the following example: 

notify_content: 
title: "Anomaly Detected: {{.ProcessorDescription}}"
Disable Default Fields 

notify_content:

 disable_default_fields

Enter true or false to disable default fields in a notification.

If you disable default fields, then Edge Delta recommends that you configure custom headers and custom fields. 

This parameter is optional. 

Review the following example: 

notify_content: 
disable_default_fields: false
Custom Headers custom_headers

This parameter is used to customize the notification content.

If you do not want to use default fields in a notification, then you can create custom headers and fields.

To learn more, see Review Notify Content Parameters.

This parameter is optional. 

Review the following example: 

custom_headers: 
X-header1: "test-header"
Custom Fields

notify_content:

  custom_fields

If you do not want to use default fields in a notification, then you can create custom headers and fields.

This parameter is optional. 

Review the following example: 

custom_fields: 
"Dashboard": "https://app.edgedelta.com/investigation?edac={{.EDAC}}&timestamp={{.Timestamp}}"
"Current Value": "{{.CurrentValue}}"
"Threshold Value": "{{.ThresholdValue}}"
Payload advanced_content

A payload is JSON object that is used to define metadata about the message.

In the app, when you click Advanced Mode, you can update a pre-populated JSON file. 

You are responsible for ensuring the validity of the JSON object. 

Additionally, configurations you make in Advanced Mode will override all other configurations, including custom_fields, title, and disable_default_fields.

This parameter is optional. 

Review the following example: 

[
    {
        "content": {
            "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
            "body": [
                {
                    "columns": [
                        {
                            "items": [
                                {
                                    "text": "**{{ .Title }}**",
                                    "type": "TextBlock"
                                },
                                {
                                    "text": "{{ .Message }}",
                                    "type": "TextBlock"
                                }
                            ],
                            "width": "stretch"
                        }
                    ],
                    "spacing": "large",
                    "type": "ColumnSet"
                }
            ],
            "type": "AdaptiveCard",
            "version": "1.2"
        },
        "contentType": "application/vnd.microsoft.card.adaptive"
    }
]


Review Sample Configuration

The following sample configuration displays an output without the name of the organization-level integration:

      - name: microsoft-teams-integration
        type: teams
        endpoint: "https://outlook.office.com/webhookb2/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX@XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/IncomingWebhook/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
        notify_content:
          title: "Anomaly Detected: {{.ProcessorDescription}}"
          disable_default_fields: false
          custom_fields:
            "Dashboard": "https://app.edgedelta.com/investigation?edac={{.EDAC}}&timestamp={{.Timestamp}}"
            "Current Value": "{{.CurrentValue}}"
            "Threshold Value": "{{.ThresholdValue}}"
            "Custom Message": "{{.CurrentValue}} exceeds {{.ThresholdValue}}"
            "Matched Term": "{{.MatchedTerm}}"

 

Share this document