Azure DBaaS Alerts

At one of my previous DBA jobs, I encountered some performance issues in our Azure PaaS offering. Clients were experiencing 30-40 second login times and 10-15 second save times, which is considered poor. Of course, everybody’s first thoughts were, “THE DATABASE IS SLOW!!” After pulling up every single chart and metric I could, I finally proved to them it was not the database.

Our developers conceded that this could be a code issue, as we were seeing a fair majority of failures to our AD service when trying to connect. We did not have enough information to go off of, though, so our developers wanted to add some more telemetry logging. During our routine maintenance window, they added the logging and asked if I could monitor our internal LOG database to ensure it won’t grow too large.

When I looked at the initial size of our log database, I was thrown back…500GB?!? Whoa! After I had a cup of coffee and looked again, we were allocated 500GB but only using 3GB (reinsert tongue into mouth). I thought to myself, “Ok, this is a good base, but let me just create a generic Azure alert to let me know if this database grows over 450GB. Because if it does, I am going to have to get a hold of DEV and say ‘get your stuff and get out, because I am going to truncate.'”

Creating alerts in Azure was a first for me, so I thought I’d document my process to help beginners set their own Azure alerts up more smoothly. Here are the steps, with screenshots!

Step 1) Open your DBaaS server in Azure
Step 2) Find your database
Step 3) Click on your database
Step 4) Scroll down until you get to the monitoring section, and click on “Alert Rules”

Step 5) Click on Alert rules, and you should get a blank window to the right (Unless you already have alerts created)
Step 6) Click on the + sign to “Add Alert.” This brings up the new alert page.

Step 7) I normally select the Metric first. This way, I can determine how to name my alert and such afterwards. Here are the different metrics you can select:

Step 8) For this particular instance, I wanted “Total Database Size.” I filled out my alert like so:

Step 9) I clicked “OK” to save my alert.

That is it! Pretty simple, right? Stay tuned for more Azure tips from me soon!

Leave a Reply

Your email address will not be published. Required fields are marked *