Microsoft Teams is gaining a lot of traction in DevOps space and has over 65+ DevOps apps in store. We also constantly look for user feedback/how to improve the experience for our dev community. One of the asks from our customers has been the integration of New Relic into Teams. New Relic is one of widely used tools in DevOps space. It allows developers to find and fix problems faster, building high performing DevOps teams.
There’s an existing New Relic connector on appsource that you can use to configure New Relic notifications in Teams. This article explains how we can use incoming webhooks and make New Relic notifications actionable.
Webhooks are ‘user-defined HTTP callbacks’. They are trigged by some events like drop in response time, higher CPU usage, values (like count, average etc.). Whenever the event occurs, the source site makes an HTTP request to the URL configured for the webhook.
Generating Webhook for Teams
Add incoming webhook connector to the Teams channel where you want to receive the New Relic notifications. You can even choose to upload the custom image for your connector. If you choose not to upload the custom image, default incoming webhook image will be shown at notifications. Copy the URL from the webhook, this will be needed when you would configure the notifications in New Relic portal.
Configuring Webhook on New Relic Portal
From New Relic portal, create a new notification channel using webhooks. Fill in the webhook details at the new relic page. In ‘Base Url’ field, paste the URL copied from Teams incoming webhook configuring page.
Custom JSON Example
Below is the custom payload example that I used to generate the notification card. You can use your own custom JSON it based on your needs.