Tip:
Highlight text to annotate it
X
Hi my name is Bret McGowen and I am a software developer here at Rackspace. Today, I'm
going to be walking through how to set up Cloud Monitoring for your application on the
Rackspace Cloud. Cloud Monitoring is a quick and easy way to set up monitoring for your
application 24x7 from different geographic regions to make sure your response time is
good, your servers are up and your application is performing properly. So I'm going to
walk you through how to set up some of these in the control panel.
I have here the Rackspace cloud control panel, so I'll go ahead and click on this server,
"My Blog" that I want to set up a monitoring check for. So this pulls up the information
about my server. I'm going to scroll down to Monitoring Checks and you can see that
we don't have any monitors set up right now. So the most basic one we're going to
set up right now is called the ping check and that's just going to send and ICMP packet
to the server just to say, "Hey! Are you alive?" So nothing fancy, just a, just a,
quick ping check.
So I'm going to say "Ping Check" it automatically knows the IP address of my server,
I'll hit "Create Check" and once that runs through, that should be it. It's ready
to go, it has been set up. So now it will, every 60 seconds it will ping your server,
just to say, "Hey! Are you alive?" and if it fails, then it will let you know. And
it will ping it from three different regions: Dallas/Fort Worth, London and Chicago. So
that's a great way to make sure that your app is up from all three of those different
locations.
So in addition to a basic ping check, you can do some more advanced things using an
HTTP check. For example, you can make sure text on a webpage shows up properly. If you
have an Ecommerce application, you can make sure your most popular products are available
and can be added to your cart, or you can have the check login to your application and
make sure that your authentication system is working. So, let's take a look at how
to setup a simple HTTP check.
So let me scroll back down to the Monitoring Checks. I'll hit "Create Check," and
change it to "HTTP Check" for the website. I'm going to name it [typing sound...] and
put in my URL, so I've set this up [typing sound...] for my URL and I'll click Advanced
Options. So, under Advanced Options this is where you can put in some text where it is
actually going to look in the HTML source of the response it gets back from the server.
So a good way to check something is to make sure that the footer, for example, on your
website text comes back and then that way you know that a bunch of things are working.
Your web server is working that it's you know going to your application and pulling
out whatever data that it needs. So, I know that on my blog, for example, the footer says,
"Proudly powered by WordPress," so I'll paste that in there.
If you click on the "More on syntax" link, that has a lot more information about some
really really powerful regular expression matching and different things like that you
can do, rather than just plain text matching. But even just the plain text matching is pretty
powerful. So I'll go ahead and create that. And that's going to set up a couple of different
what is called alarms. So, there are three different criteria that it's checking. One,
the "Body match -- string not found" so that's what we just set up, looking for
the footer text. So I'll click that, say "Edit Criteria" and you can kind of read
through some of the code that powers that alarm. So again if you look in the documentation,
it has a lot, a lot of additional things you can check for, such as response code 200.
So if it got a 404 then you could throw an alert because you know the page should be
found but it is not. So I can hit "Test Alarm" and you can see that it passed, so
everything looks good there. I'll save that... and again the other two are setup automatically,
the "Status code" is looking that you get a successful and OK 200 HTTP status code
and then the "Connection time" is just making sure that your server responds in the
appropriate amount of time.
So that was an example of a pretty easy to setup but powerful HTTP check. For more information,
on advanced monitoring, a Python and Ruby library you can use in your application and
more information about the API you can go to docs.rackspace.com and look for Cloud Monitoring.
Thanks for watching, and sleep easier knowing that Cloud Monitoring is watching your application.