DevOps/Github service notifications using Azure Logic Apps

Github/DevOps service status

As described in my previous post, you can easily check the status of Github and DevOps services:

Github/DevOps status
Marcel.L ・ Aug 27 ・ 1 min read

#tu…



Github/DevOps service status

As described in my previous post, you can easily check the status of Github and DevOps services:

Additionally, status pages for both Github and DevOps have RSS feeds we can subscribe to. In fact the Azure platform itself also has its own health status page you can take a look at here: https://status.azure.com/en-us/status/.

In todays tutorial we will build a basic Azure Logic App that will subscribe to each services RSS feed and send us email notifications on feed updates, such as when services become degraded, when health issues occur or when health issues get remediated.



What is an Azure Logic app?

Azure Logic Apps is a cloud-based platform for creating and running automated workflows that integrate your apps, data, services, and systems. With this platform, you can quickly develop highly scalable integration solutions for your enterprise and business-to-business (B2B) scenarios. As a member of Azure Integration Services, Logic Apps simplifies the way that you connect legacy, modern, and cutting-edge systems across cloud, on premises, and hybrid environments.



What do we need?

  1. Azure Logic App: We will create a multi-tenant logic app using the Consumption pricing plan.
  2. Email Account: We will also need an email account from a service that works with Azure Logic Apps, such as Outlook.com. For other supported email providers, review Connectors for Azure Logic Apps.



Create Logic App

In the Azure portal search for logic app and then add and create the logic app with the following configuration. Under the Basics blade, add the following Instance Details:

Name Value
Type Consumption
Logic App name {Name}
Publish Workflow
Region {Region}

create

Add any tags optionally and then select Review + Create, and create the Logic App.



Configure Logic App

After the Logic App has been created navigate to the resource, once you click on the resource, the Azure portal will navigate into the Logic Apps Designer, here we will select a new Blank Logic App:

blank01

Next we will create a schedule trigger. On the connectors and triggers search bar type: schedule and select the trigger called recurrence:

schedule

We will set this trigger to run every 3 minutes.

time

Next we will add each of our RSS feeds as parallel actions underneath our schedule. Click on + New step underneath the recurrence trigger and search for rss. We will add the action “List all RSS feed items” 3x times as we want to check three RSS feeds, one for each service:

rss_actions

We will configure each action under our recurrence schedule with the following values:

Parameter Name Value
The RSS feed URL {RSS URL Feed}
since addminutes(utcnow(), -3)

NOTE: We are only using the since parameter and an expression addminutes(utcnow(), -3) as the value, which will basically instruct our logic app to check the given RSS feed for any new posts within the last 3 minutes. Since our logic app will run on a recurring schedule every 3 minutes, checking for new posts within the last 3 minutes, we should never miss any updates.

function

Also note that we can rename our action so that it is easier to identify:

rename03

After setting up our first RSS action, underneath our schedule trigger we will click on the + sign and select the option add a parallel branch:

parallel01

Similarly we will add an action for our devops status RSS feed and repeat the process a third time to also add our azure status RSS feed. After adding all our feeds as parallel actions, our Logic App design should look like this:

actions_final

Now that all 3 actions have been set up the last thing we need to configure are our email actions. We will create 3x email actions, one for each RSS feed. After each action you will see a + sign. Click on the + and select Add an action:

action01

Search for control and then select the action for each:

fore_each

We can again rename our control action so that it is easier to identify. Within the for each action we will configure Body as the output from previous steps and then add an action. In the search box, enter send an email so that you can find connectors that offer this action. If you have a Microsoft work or school account and want to use Office 365 Outlook. Or, if you have a personal Microsoft account, select Outlook.com. This example continues with Outlook.com. Select Send and email (V2):

email02

Many connectors require that you first create a connection and authenticate your identity before you can continue. Our selected email service prompts us to sign in and authenticate our identity before we can continue:

auth

Once authenticated we can configure our e-mail template:

template01

Note that we can populate our email template with dynamic content to add details about the RSS feed we configured earlier:

dynamic

As you can see from the next screen, we have created 3x email actions, each with their own unique email template for each given RSS status feed:

final03

Remember to save the logic app when finished. That is it! Optionally we can also select Run Trigger to manually trigger a test run of the Logic App we created.

save

Now every time a new health status is posted to any of our configured RSS feeds, we will be notified via an email notification containing the details of the affected service.

mail01

mail02

I hope you have enjoyed this post and have learned something new. You can also find the JSON code sample and template of the Logic App we built in this tutorial on my Github page. ❤️



Author

.ltag__user__id__620034 .follow-action-button {
background-color: #0cbb58 !important;
color: #000000 !important;
border-color: #0cbb58 !important;
}

pwd9000 image


Print Share Comment Cite Upload Translate
APA
Marcel.L | Sciencx (2024-03-29T00:21:56+00:00) » DevOps/Github service notifications using Azure Logic Apps. Retrieved from https://www.scien.cx/2021/08/30/devops-github-service-notifications-using-azure-logic-apps/.
MLA
" » DevOps/Github service notifications using Azure Logic Apps." Marcel.L | Sciencx - Monday August 30, 2021, https://www.scien.cx/2021/08/30/devops-github-service-notifications-using-azure-logic-apps/
HARVARD
Marcel.L | Sciencx Monday August 30, 2021 » DevOps/Github service notifications using Azure Logic Apps., viewed 2024-03-29T00:21:56+00:00,<https://www.scien.cx/2021/08/30/devops-github-service-notifications-using-azure-logic-apps/>
VANCOUVER
Marcel.L | Sciencx - » DevOps/Github service notifications using Azure Logic Apps. [Internet]. [Accessed 2024-03-29T00:21:56+00:00]. Available from: https://www.scien.cx/2021/08/30/devops-github-service-notifications-using-azure-logic-apps/
CHICAGO
" » DevOps/Github service notifications using Azure Logic Apps." Marcel.L | Sciencx - Accessed 2024-03-29T00:21:56+00:00. https://www.scien.cx/2021/08/30/devops-github-service-notifications-using-azure-logic-apps/
IEEE
" » DevOps/Github service notifications using Azure Logic Apps." Marcel.L | Sciencx [Online]. Available: https://www.scien.cx/2021/08/30/devops-github-service-notifications-using-azure-logic-apps/. [Accessed: 2024-03-29T00:21:56+00:00]
rf:citation
» DevOps/Github service notifications using Azure Logic Apps | Marcel.L | Sciencx | https://www.scien.cx/2021/08/30/devops-github-service-notifications-using-azure-logic-apps/ | 2024-03-29T00:21:56+00:00
https://github.com/addpipe/simple-recorderjs-demo