# \[T&C\] Harmony Controller: Send alerts to Microsoft Teams (Webhook URL)

**URL:** <https://community.a10networks.com/t/t-c-harmony-controller-send-alerts-to-microsoft-teams-webhook-url/657>\
**Category:** Tips\
**Tags:** automation, alerts, harmony-controller\
**Created:** [May 20, 2021, 9:30pm UTC](https://community.a10networks.com/t/t-c-harmony-controller-send-alerts-to-microsoft-teams-webhook-url/657 "2021-05-20T21:30:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddharthaa](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@siddharthaa](https://community.a10networks.com/u/siddharthaa)\
**Post date:** [May 20, 2021, 9:30pm UTC](https://community.a10networks.com/t/t-c-harmony-controller-send-alerts-to-microsoft-teams-webhook-url/657/1 "2021-05-20T21:30:20Z")

</div>

In this article, we will look at configuring Harmony Controller to send alerts to a Microsoft Teams channel (webhook URL).

## Objective

Here we have a Thunder device with the following virtual service:

```yaml
slb virtual-server DOH-VIP 100.64.1.250 
 port 53 dns-udp 
  service-group SG-DNS 
  template dns dns1 

```

We want to monitor the status of this service and send an alert from Harmony Controller to a Microsoft Teams channel when the service goes up or down.

## Pre-requisite

- The Thunder device should be registered with the Harmony Controller and mapped to a tenant on Harmony Controller. Here the Thunder device is mapped to the tenant Demo-DOH on Harmony Controller.
- A webhook URL for the Microsoft Teams channel to which we want to send the alert.

## Create a custom trigger

Under Monitor \> Alert:  
Choose the tab Triggers:

 ![Screenshot 2021-05-18 151428.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/6d2ea71facf8d68dad27f55a1eed7015380990f6.jpeg)

Choose a tenant (e.g. Demo-DOH):

 ![Screenshot 2021-05-18 151647.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/c34b3cd98c880841a03d3a4637009e9a3a336094.jpeg)

Click on Add a Trigger:

 ![Screenshot 2021-05-18 163125.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/a11c722e73d321cac42001646b9be5a6280d5d59.jpeg)

Specify the matching conditions for the trigger.  
Here we match on the string “Service dns-udp on virtual server DOH-VIP port 53 is down”:

 ![Screenshot 2021-05-18 164953.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/40dc453ea7fb45345e8732f0b89c6bf85c1ecb7d.jpeg)

 ![Screenshot 2021-05-18 164921.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/21b612c1971947de5b326671663f0fd84ea0169f.jpeg)

Click on Save.

Repeat the above steps for creating a trigger for the service being up.

 ![Screenshot 2021-05-18 173949.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/d58a7a809202b550845429e356730f565492760a.jpeg)

## Add an action

Under Monitor \> Alert:  
Choose the tab Actions and click on Add an Action:

 ![Screenshot 2021-05-18 171056.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/5695a128f4883f9765a615d201cc7c33ca87453d.jpeg)

Here we want to send the alert to a Microsoft Teams channel and hence choose the option POST and specify the webhook URL for that channel:

 ![Screenshot 2021-05-18 171238.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/052de43646bfa3f60c4620285fc746994406412f.jpeg)

Click on Save.  
The action will be created:

 ![Screenshot 2021-05-18 171324.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/1d0b3f1487206f98bb9e61deffb657bca8a9e4ee.jpeg)

## Create the Alert

Under Monitor \> Alert:  
Choose the tab Alert Configuration and then click on Add an Alert Definition:

 ![Screenshot 2021-05-18 171428.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/4087271d7ccc00177d32e08ee3a4abff91447f8c.jpeg)

Choose the trigger and action we had created earlier:

 ![Screenshot 2021-05-18 172021.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/69d1c49620fb6ce47f9ecffb32b6e0e437ef7fb0.jpeg)

 ![Screenshot 2021-05-18 172040.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/a95587e28aee0e67567f91afdc77e256cb9d58ce.jpeg)

 ![Screenshot 2021-05-18 172057.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/deb28e3763d5b7dcaebb90dca1af52b4e76fb440.jpeg)

 ![Screenshot 2021-05-18 172118.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/288a12373ba57ae1cfd51a6e9ccdb7a4b2a6de73.jpeg)

Click on Save.

Repeat the above for creating an alert for the service being up.

Here is a summary of the two alerts:

 ![Screenshot 2021-05-18 174313.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/a929b935827f92c0c77fcfb250bf17cb50f0be2f.jpeg)

## Verification

On the Thunder device:  
Manually disable the virtual service:

```yaml
vThunder(config)#slb virtual-server DOH-VIP 100.64.1.250
vThunder(config-slb vserver)# port 53 dns-udp
vThunder(config-slb vserver-vport)#disable

```

You will be able to see the alert for the service being down on Harmony Controller under Monitor \> Alert:  
Choose the tab Generated Alerts:

 ![Screenshot 2021-05-18 174542.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/c8038918289e70d95793d1ef8ffb0188f73662a4.jpeg)

On the MS Teams channel, you should be able to see the alert. Here is a sample screenshot:

 ![Screenshot 2021-05-18 174636.jpg](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/28ecb305fe72c7b25d20336e1492b7a59e343134.jpeg)
