Friday, February 14, 2014

Adding Site Uptime Alerts to Windows Azure Website

Windows Azure has some great built-in features.  One that is particularly helpful is adding site uptime alerts to your website, so if your uptime is below a particular threshold, you can get inundated with emails until someone fixes your problem.

Adding site uptime alerts for a Windows Azure website isn’t completely straightforward however, as you need to perform some steps in two different areas.  As such, after fiddling around a little, I decided to take some screenshots and post em online for you.. consider it my valentines day present.

Step 1 – Adding end points

The first step in configuring site uptime alerts is setting up a monitoring end point.  Consider this the URL of your website that anyone\anything can “ping”.  With end points, if the HTTP response is a 200, you’re OK.  If a 400 level code is returned, then something is considered wrong.  For my applications, I like to have 2 types of endpoints, one that’s basic and should simply display something, and one that tests some business logic.*

To setup an endpoint, go to the appropriate Azure Website in the Azure Management portal.  Once within the website, go to the Configure tab, and scroll to the Monitoring section.  Here, you can enter your end point URL’s that should be tested every 5 minutes (added bonus, constant activity will keep your website warm!). 

monitor_1

You have three items to input, a name (something to benefit you when you look for these end points later on), the URL of your end point, and the geographic location\locations that you want to test from.  Here, you can see that I chose my website login page as my end point, and California, Illinois and Virginia as my test locations (you only get up to 3 at this time).

monitor_2

Once done, be sure to click save at the bottom of the screen to commit your changes.

Step 2 – Setup your alert for your end points

Now that you have an end point setup to monitor, that particular URL will be tested once every 5 minutes.  To trigger an alert on this activity, go to the Management Services section within the Windows Azure Management portal.  This is the fourth last button on the bottom left of the navigation bar.

Within this area, choose “Add Rule” at the bottom of the screen to create a new management service alert. Doing so brings up a simple 2 step wizard.  The first is to give your alert a name.  The name itself can only be 32 characters long, so  be concise, but go crazy with the description. Lastly, choose the type of service you are trying to setup an alert on.  In this instance, choose Web Site and then choose the name of your Azure Website that you just setup the end point for.  After giving a name\description\service, step 2 let’s you choose what your alert should be based on.

Below is an example of my uptime alert.  For the metric field, you can choose Uptime for the particular geo-location.  This means that you setup alerts to trigger from one particular location, rather than indicating the website is “down”.  Here you can see that I chose to say if my uptime from California is below 99.9% for 15 minutes, send an email to my admin.

monitor_3

And that’s all there is to it!

*So for example, my basic test is my login page.  If a user can’t hit that page, something’s rotten in Denmark.  My other page, however, does some actions behind the scenes to test some logic for me.  Perhaps my application relies on a database or 2, and\or some web services, and if these weren’t up, my site would be worthless.  So for this page, I perform a series of database\service calls ensuring that I can connect, perform some basic function, etc.  If any of these fail, I can return a 400 level HTTP response code, indicating that even though traffic is enabled to my site, some service\services are down.

20 comments:

  1. Nice information. I was searching for the same. It helped me alot and saved my time. Thanks alot. , windows azure training in hyderabad

    ReplyDelete
    Replies
    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.
      or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

      Delete
  2. I have been reading out a lot of your articles and that i ought to say pretty nice stuff.
    I will certainly bookmark your Blog.neha
    Hybris Training

    ReplyDelete
  3. Thank you for this valuable information. I have got some important suggestions from it.
    best erp software in chennai | leading erp solutions in chennai

    ReplyDelete
  4. Really Nice Blog. Thank you for Sharing. We are the best erp software providers in chennai. For more details call +91 9677025199 or email us on info@bravetechnologies.in
    ERP Providers Chennai | ERP in Chennai

    ReplyDelete

  5. The website is looking bit flashy and it catches the visitors eyes. A design is pretty simple and a good user-friendly interface.

    Programmierung in L├╝denscheid

    ReplyDelete
  6. Great blog.. I found some useful info in your article, it was awesome to read, thanks for sharing this great content to my vision.. Software Testing Training Institute in Chennai | Selenium Training Institute in Chennai | ISTQB Training Institute in Chennai

    ReplyDelete
  7. This article is very much helpful and i hope this will be an useful information for the needed one. Keep on updating these kinds of informative things...
    No.1 MBA Project Center in Chennai | No.1 MBA Project Center in Velachery

    ReplyDelete

  8. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging...
    PHP developers in chennai | PHP developers in India

    ReplyDelete

  9. Thanks for sharing this niche useful informative post to our knowledge.
    brochure designers in chennai | brochure design company in chennai

    ReplyDelete
  10. Thanks for sharing this valuable information..I gathered some information from this blog..Summer Course in Thiruvanmiyur | Summer Course in Chennai

    ReplyDelete
  11. Excellent information with unique content and it is very useful to know about the information based on blogs...
    Best Summer Courses for School Students in Chennai | Best Summer Courses for School Students in Velachery

    ReplyDelete
  12. Found your post interesting to read. I cant wait to see your post soon. Good Luck for the upcoming update.This article is really very interesting and effective.
    Good Vacation Classes in Chennai | Best Summer Course in Porur

    ReplyDelete
  13. Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
    Summer Course Training Institute in Chennai | Summer Course Training Institute in Velachery

    ReplyDelete
  14. Your good knowledge and kindness in playing with all the pieces were
    very useful. I don’t know what I would have done if I had not
    encountered such a step like this.


    white label website builder

    ReplyDelete