Rackspace Cloud Monitoring
Monitoring your servers/cloud instances is now easy with the use of Rackspace Cloud Monitoring solutions. The traditional way of monitoring your servers or services was by installing a monitoring tool such as Nagios, Shinken, Systems Centre Operations Manager (SCOM), Zabbix, WhatsUpGold etc. Most of these tools require a separate dedicated server. This increases the time and effort needed to support/monitor/maintain the software as well as the server it lives on. Monitoring software such as Nagios provide extensive functionality which is dependent on the use case. For simple monitoring situations, Rackspace cloud monitoring could be all that is required.
Using Rackspace we were able to monitor our servers/instances from three different monitoring zones. Since we were able to utilize quorum with all three zones in play we were able to decrease false positives. Rackspace Cloud monitoring can be easily setup using raxmon, a CLI tool written in python. This tool interacts with Rackspace Cloud Monitoring API using the libcloud library interface. The raxmon source code is available on Github –
If more detailed host level monitoring is required then, the rackspace-monitoring-agent will need to be installed on the target server. This article describes how to get started with the Rackspace Perimeter Monitoring Cloud service. It is very easy to enable remote monitoring of servers/services in a local computer room, colocation, or even in clouds other than Rackspace using our custom script.
1. Should have Rackspace account ( username and api key).
You will be able to get the API key by logging into the rackspace portal https://mycloud.rackspace.com (using your user name and password) from a Unix/Linux machine (desktop/server) with access to the Internet.
2. Installation of RaxmonCLI a Command line Interface (CLI) tool
Raxmon requires Python 2.5,2.6 or 2.7. This CLI tool is available in github as open source: https://github.com/racker/rackspace-monitoring-cli
3. Install the rackspace-monitoring-cli using the pip tool.
For the complete installation steps, please refer to http://www.rackspace.com/knowledge_center/article/getting-started-with-remote-monitoring
Configuring the RaxmonCLI
Under your home directory from where you would like to run the raxmon tool create a .raxrc file. Enter the following in the file
[credentials] username=<> api_key=<> [api] url=https://monitoring.api.rackspacecloud.com/v1.0 [auth_api] url=https://identity.api.rackspacecloud.com/v2.0 [ssl] verify=true
Once the RaxmonCLI have been configured, make sure it is working by running raxmon-entities-list.
Copy over the script raxmon-monitoring-create.sh ( from our github https://github.com/Win2ix/Rackspace-Cloud-Monitoring ) to the same home directory where you created the .raxrc file. and give the script executable privileges.
Running the Script
Once you run the script, it will display the list of servers which is presently being monitored. If you wish to add a check for a new server, create a new server (entity)
Now it will list out the list of email address for which you would like to configure the alerts. If all the email addresses exist then use them. If not, create a new plan with all the email addresses.
The script will then ask for the type of check you want to configure. You can select:
1 for HTTP
2 for PING
3 for IMAP
Answer this set of questions and your script will be created.
By default, this script makes use of 3 different monitoring zones
You will be able to modify these monitoring zones by editing the script ( raxmon-monitoring-create.sh) and making changes at the appropriate places.
This script is helpful for creating multiple checks for multiple servers. To make modification to the checks, to add more servers, or to add more checks, you can always login to the GUI: https://ui-labs.cloudmonitoring.rackspace.com
This script was written in bash to cover very simple scenarios. It can be extended with ease depending on a specific situation or requirement. If you require any information on this script please drop me an email at email@example.com/ Win2ix Systems