Introduction to Elastic Pool:
In this article, we will setup an Azure Monitor Alert to Scale up the Storage limit of an SQL Elastic Pool on Azure. Please read more about Elastic Pool in the above article.
We will divide this into three parts
i. Setting up an Automation Runbook and Webhook
ii. Setting up an Alert Action Group
iii. Setting up an Alert under Azure Monitor.
We will not talk much about Azure Automation or Azure Monitor as they are off the topic, we will only cover the steps for setting up of this Auto scale of storage. Here are some of the articles that should bring you up to Speed.
Create Azure Automation Account [ In this case, we would need to use RunAsAccount]
Using Az modules in Azure Automation Account
Azure Monitor Overview
Monitoring Azure Service
Setting Up Automation Modules
By default, you cannot run both Az and Rm Modules on the Automation and this is explained here:
So, we will import the Az Modules to the Automation Account and not Rm Modules. By default, when you create an Automation Account, there is a bunch of modules imported and we will not touch them as we will use the AZ modules.
Here is what you need to do.
This Completes the first part where we have created the Automation Runbook, setup modules and a Webhook.
Setting up an Alert Action Group
In this section, we will create an Action Group that we will use with an Alert.
Please follow the steps below to create an Action Group
This completes the creation of Action Group.
Setting up an Alert under Azure Monitor
In this part, we will create an Alert that will trigger our Runbook whenever the used space is greater than some value. Please follow the steps below.
That covers all the three configurations involved. Whenever the data space used percentage on the Elastic Pool increases over 70%, an alert will be triggered, and the Runbook invoked through Webhook will resize the storage on the Elastic Pool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.