Filed in Product & Development by Wade Minter | February 25, 2010 10:53 am
As a longtime Unix sysadmin, I’ve beaten my head against more system monitoring tools than I care to remember. However, I’ve recently been playing around with Scout, a hosted monitoring solution, and have been very impressed. As a bonus, I discovered a cool feature that makes monitoring clusters of cloud servers much less time-consuming. This article will show you how to use the Scout “Cloud Image” feature to have your new servers automatically monitored. It assumes that you have already signed up for a Scout account (there’s a free trial) and have the ability to deploy Rackspace Cloud Servers.
I’ve spun up a basic Fedora 12 server that will be the base image for my farm of web servers in this instance, and have set up this initial server in Scout. After creating that server in Scout, I get instructions to install one Ruby gem, a server key, and a sample crontab entry. Easy!
I’ll then go install that gem on my test server, register the server with Scout, and set up the crontab entry so that it will update Scout every minute.
[root@scout-web1 ~]# yum install ruby rubygems[Omitted for brevity]Complete!
[root@scout-web1 ~]# gem install scoutSuccessfully installed elif-0.1.0Successfully installed scout-5.0.32 gems installed
[root@scout-web1 ~]# scout=== Scout Installation Wizard ===You need the Server Key displayed in the Server Settings tab.It looks like:6ecad322-0d17-4cb8-9b2c-a12c4541853fEnter the Server Key:37dc7d3f-290d-408d-9605-c31c727450b9Attempting to contact the server...Success!Now, you must setup Scout to run on a scheduled basis.If you are using the system crontab(usually located at /etc/crontab):****** START CRONTAB SAMPLE ******* * * * * root /usr/bin/scout 37dc7d3f-290d-408d-9605-c31c727450b9****** END CRONTAB SAMPLE ******If you are using this current user's crontab(using crontab -e to edit):****** START CRONTAB SAMPLE ******* * * * * /usr/bin/scout 37dc7d3f-290d-408d-9605-c31c727450b9****** END CRONTAB SAMPLE ******For help setting up Scout with crontab, please visit:
[root@scout-web1 ~]# echo "* * * * * root /usr/bin/scout 37dc7d3f[...]" >> /etc/crontab
At this point, you can do anything else you need to get this server ready to be a base image for future instances in your web cluster (update packages, install application software, configure centralized authentication, etc). When you’re done, visit the Rackspace Cloud control panel and create a backup snapshot image for this server.
While that backup is saving, go back over to Scout. Select this server from the monitored servers list, then choose the “Server Settings” tab from the top-right. You’ll then check the “Cloud Image” checkbox. What this does is tell Scout that any other server that checks in with this same key is functionally equivalent to this server, so it should get the same settings, alert thresholds, plugins, and such that you define for this server.
At this point I’ll go into the server definition for this monitored server in Scout and add a couple more plugins to this server’s monitoring setup, to get it like I want it.
Now, it’s back to the Rackspace Cloud control panel to kick off a couple more cloud servers. Only this time, instead of choosing the generic Fedora 12 instance as a base image, I’ll choose the “My Backups” tab and select the snapshot that I just saved of the customized system. From there, I’ll create two more web servers.
Now we go back to scout, look at our server tab, and the two new servers have just appeared, replicating the configuration of the original!
If you add new plugins or change thresholds to the primary system’s monitoring configuration, newly created servers will pick them up. You can push out updates to existing servers using Scout’s Copy & Paste functionality.
So just like that, you can quickly and easily have new servers in your Cloud clusters get their monitoring configured at bootup – no more SSH’ing into each server, or having to constantly update a server image. Now that’s a time-saver.
For more information, visit Scout or talk to us here at the Cloud! If you can’t wait to try out Scout in your environment, sign up with coupon code “rack” (now until March 3rd) and get $10 off of your first paid month of service.
Source URL: http://www.rackspace.com/blog/scaling-your-monitoring-with-scout-2/
Copyright ©2014 The Official Rackspace Blog unless otherwise noted.