Harmony Controller: Send alerts to Microsoft Teams (Webhook URL)

siddharthaasiddharthaa Member, Moderator mod
edited May 2021 in Tips

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:

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:


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



Click on Add a Trigger:


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":


Click on Save.


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


Add an action

Under Monitor > Alert:

Choose the tab Actions and click on Add an Action:


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:


Click on Save.

The action will be created:


Create the Alert

Under Monitor > Alert:

Choose the tab Alert Configuration and then click on Add an Alert Definition:


Choose the trigger and action we had created earlier:


Click on Save.


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


Here is a summary of the two alerts:


Verification

On the Thunder device:

Manually disable the virtual service:

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:


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


Tagged:
Sign In or Register to comment.