This past week has been extremely hectic/busy around my office. We were encountering some performance issues in our PaaS offering in Azure. Clients were experiencing 30-40 second login times, 10-15 second save times. This is pretty bad. Of course, everybody’s first thoughts were “OMG THE DATABASE IS SLOW!!”. So, after pulling up EVERY SINGLE CHART/METRIC I could, I finally proved to them it was not the database.
Our development team finally conceded that this could be a code issue as they were seeing a fair majority of failures to our AD service when trying to connect. They did not have enough information to go off of though, so they wanted to add some more telemtry 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. After I looked at the initial size of our log database, I was thrown back…500GB?!? Holy crap! Well, 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, I’ll 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”.
I have never created alerts in Azure before, so this was a first. 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? I am sure there are many more things to alert on. I am going to try and write more technical blogs on Azure related topics as I keep thinking about them. Stay tuned!