Learn about the Wavefront Microsoft Teams Integration.

Microsoft Teams Integration

Microsoft Teams is a popular team collaboration tool. You can use Wavefront alerts to send a message to a Microsoft Teams chat channel. With the help of webhooks you can integrate Wavefront alerts into Microsoft Teams as a Connector.

Microsoft Teams Setup

Step 1. Create a Webhook Connector in Microsoft Teams

In Microsoft Teams, choose or create the Team to which you want to send the alert.

  1. Click the arrow to the left of the team name.
  2. Select the ellipsis (3 dots) to the right of General and select Connectors images/msteams_general.png

In the dialog:

  1. Select Configure, to the right of Incoming Webhook images/msteams_connectors.png

  2. Choose a name for this incoming webhook, optionally upload an image that will be displayed by alert messages, and click Create.

After a few seconds, a new window prompts you to copy the webhook URL. Wavefront will use this URL to send alerts to Microsoft Teams.

  1. Copy the URL and click Done.

The Microsoft Team is now ready to receive webhook alerts. Note that you can create multiple webhook alert targets, each with its own URL, if you want to multiple alerts to the same Microsoft Team. images/msteams_webhook.png

Step 2. Create a Microsoft Teams Alert Target

  1. In Wavefront, create an alert target.
  2. Give the alert target a meaningful name.
  3. In the Triggers field, select the alert state changes that should trigger the notification. See Creating an Alert Target.
  4. Make sure the Type is Webhook.
  5. Paste the application’s notification URL into the URL field.

  6. Set Content Type to application/json.
  7. Customize the alert_notification.
  8. Give a meaningful description to your new alert target.
  9. Copy and paste the following into the Body Template box of the alert target.
    {{#setDefaultIterationLimit}}500{{/setDefaultIterationLimit}}
    {{#setFailingLimit}}500{{/setFailingLimit}}
    {{#setInMaintenanceLimit}}500{{/setInMaintenanceLimit}}
    {{#setNewlyFailingLimit}}500{{/setNewlyFailingLimit}}
    {{#setRecoveredLimit}}500{{/setRecoveredLimit}}
    {
     "@type": "MessageCard",
     "@context": "https://schema.org/extensions",
     "summary": "{{{subject}}}",
     "themeColor": "0078D7",
     "title": "{{{subject}}}",
     "sections": [
         {{#trimTrailingComma}}
         {
             "facts": [
    
               {
                 "name": "Status",
                 "value": "{{headline}}"
               },
               {
                 "name": "Reason",
                 "value": "{{reason}}"
               },
               {
                 "name": "Severity",
                 "value": "{{{severity}}}"
               },
               {
                 "name": "Condition",
                 "value": "{{#jsonEscape}}`{{{condition}}}`{{/jsonEscape}}"
               },
               {
                 "name": "Event Started",
                 "value": "{{{startedTime}}}"
               },
    
           {{! Alert started section }}
           {{#isAlertOpened}}
             {
         	  "name": "Newly Failing Series",
                 "value": "{{#jsonEscape}}{{#newlyFailingSeries}}{{{.}}},{{/newlyFailingSeries}}{{/jsonEscape}}",
                 "short": false
             },
         {{/isAlertOpened}}
    
         {{! Alert Updated section }}
             {{#isAlertUpdated}}
               {
           "name": "Failing Alert Series",
           "value": "{{#jsonEscape}}{{#failingAlertSeries}}(Host: {{host}}, Label: {{label}}, Tags: {{tags}}), {{/failingAlertSeries}}{{/jsonEscape}}",
           "short": false
         },
             {{/isAlertUpdated}}
    
             {{! Alert Resolved section }}
         {{#isAlertResolved}}
           {
           "name": "Recovered Sources",
           "value": "{{#jsonEscape}}{{#recoveredHosts}}{{{.}}},{{/recoveredHosts}}{{/jsonEscape}}",
           "short": false
           }
         {{/isAlertResolved}}
       ],
               "text": "{{{additionalInformation}}}"
         },
         {{#imageLinks}}
     {
       "text": "![Graph]({{{.}}})"
     },
     {{/imageLinks}}
     {{/trimTrailingComma}}
     ],
     "potentialAction": [
         {{#trimTrailingComma}}
         {{#url}}
         {
             "@type": "OpenUri",
             "name": "View Alert",
             "targets": [
                 {
                     "os": "default",
                     "uri": "{{{url}}}"
                 }
             ]
         },
         {{/url}}
         {{/trimTrailingComma}}
     ]
    }
    

Customize other aspects of the template as desired. images/msteams_alert_target.png

  1. Click Save.

Step 3. Test the Saved Alert Target (Optional)

  1. In Wavefront, select the ellipsis (3 dots) to the left of your saved alert target.
  2. Click Test to send a test notification message to your Team.
  3. Go to Teams and verify that the sample notification has been received.

Step 4. Add the Microsoft Teams Alert Target to a Wavefront Alert

  1. In Wavefront, open the Alerts browser.
  2. If you have an alert, locate the alert and click the alert name to open the Edit Alert screen. Otherwise, create an alert. For help, see Creating an Alert.
  3. Scroll down to the Target List field.

  4. Enter the alert target ID into the Alert Target field.
  5. Select the alert target from the dropdown list to add the list of targets.
  6. Click Save.