• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

Install the Cloud Monitoring Agent

This article describes how to install and set up the Cloud Monitoring Agent on a Cloud Server. This article describes the following tasks:

  1. Install the agent on your server
  2. Run the agent setup program
  3. Start the agent
  4. Upgrade the agent
  5. Uninstall the agent
  6. Next steps

Install the Agent

Package Manager installation is supported for these environments:

For information about installing the agent from the source code repository, see https://github.com/racker/virgo.

Install on Ubuntu and Debian

  1. Log in to the server that you want to monitor.

  2. Find your Linux distribution and version in the table below and run the command listed to add the monitoring agent package repository to APT, the Advanced Packaging Tool (please copy the WHOLE COMMAND):

    Ubuntu 10.04 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-10.04-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Ubuntu 11.04 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-11.04-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Ubuntu 11.10 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-11.10-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Ubuntu 12.04 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-12.04-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Ubuntu 12.10 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-12.10-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Ubuntu 13.04 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-13.04-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Ubuntu 13.10 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-13.10-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Ubuntu 14.04 sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/ubuntu-14.04-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Debian Squeeze sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/debian-squeeze-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
    Debian Wheezy sudo sh -c 'echo "deb http://stable.packages.cloudmonitoring.rackspace.com/debian-wheezy-x86_64 cloudmonitoring main" > /etc/apt/sources.list.d/rackspace-monitoring-agent.list'
  3. Use this command to download the signing key for the agent repository and add it to APT:

    curl https://monitoring.api.rackspacecloud.com/pki/agent/linux.asc | sudo apt-key add -
  4. Run an APT update to get package information for the new repository:

    sudo apt-get update
  5. Install the agent:

    sudo apt-get install rackspace-monitoring-agent

Next, run the agent setup program.

Install on Red Hat, Fedora, and CentOS

  1. Log in to the server that you want to monitor.

  2. Find your Linux distribution and version in the table below and run the listed command to install the package signing key (please copy the WHOLE COMMAND):

    Red Hat 5 curl https://monitoring.api.rackspacecloud.com/pki/agent/redhat-5.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
    Red Hat 6 curl https://monitoring.api.rackspacecloud.com/pki/agent/redhat-6.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
    Fedora 16 curl https://monitoring.api.rackspacecloud.com/pki/agent/fedora-16.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
    Fedora 17 curl https://monitoring.api.rackspacecloud.com/pki/agent/fedora-17.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
    Fedora 19 curl https://monitoring.api.rackspacecloud.com/pki/agent/fedora-19.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
    Fedora 20 curl https://monitoring.api.rackspacecloud.com/pki/agent/fedora-20.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
    CentOS 5 curl https://monitoring.api.rackspacecloud.com/pki/agent/centos-5.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
    CentOS 6 curl https://monitoring.api.rackspacecloud.com/pki/agent/centos-6.asc > /tmp/signing-key.asc
    sudo rpm --import /tmp/signing-key.asc
  3. Create and edit a text file at /etc/yum.repos.d/rackspace-cloud-monitoring.repo with your favorite text editor (like nano or vi).

    Find your Linux distribution and version in the table below, then add the listed config block to the rackspace-cloud-monitoring.repo file to add the agent repository to yum (Please add the WHOLE BLOCK):

    Red Hat 5 [rackspace]
    name=Rackspace Monitoring
    Red Hat 6 [rackspace]
    name=Rackspace Monitoring
    Fedora 16 [rackspace]
    name=Rackspace Monitoring
    Fedora 17 [rackspace]
    name=Rackspace Monitoring
    Fedora 19 [rackspace]
    name=Rackspace Monitoring
    Fedora 20 [rackspace]
    name=Rackspace Monitoring
    CentOS 5 [rackspace]
    name=Rackspace Monitoring
    CentOS 6

    name=Rackspace Monitoring

  4. Install the agent package with this command:

    sudo yum install rackspace-monitoring-agent

Next, run the agent setup program.

Install on Windows

  1. Log in to the server that you want to monitor.
  2. Download the latest stable agent installer from http://stable.packages.cloudmonitoring.rackspace.com/rackspace-monitoring-agent.msi
  3. Run the installer. The installer will automatically exit when it is complete.

Next, run the agent setup program to generate a configuration file.  Without a configuration file, the agent will exit and be restarted by the Windows service manager.  To prevent this continuous restarting, run the setup program immediately after installing the agent.

Run the Agent Setup Program

The agent setup program performs the following tasks:

  • Creates an agent token, which performs authentication with Cloud Monitoring.
  • Creates an agent configuration file.
  • Runs a test connection to verify connectivity with the Rackspace data centers.
  • Associates the agent ID with the server's entity ID in Cloud Monitoring.

To run the setup program:

  1. Determine your Rackspace user name and API key.

    You can find your user name in the upper right corner of the Cloud Control Panel when you are logged in. Your API key can be found in the account settings screen; for detailed instructions, see our article on Viewing and Regenerating Your API Key.

  2. Log in to the server where you installed the agent package.
  3. Run the agent setup command.

    On Linux, enter:

    sudo rackspace-monitoring-agent --setup

    On Windows, the agent location depends on the version of the agent installed and the architecture of the operating system, and should be prefixed with "& " if you are using Power Shell. If the 32-bit agent is installed on a 64-bit system, enter:

    "C:\Program Files (x86)\Rackspace Monitoring\rackspace-monitoring-agent.exe" -o --setup

    If the 64-bit agent is installed on a 64-bit system or the 32-bit agent is installed on a 32-bit system, enter:

    "C:\Program Files\Rackspace Monitoring\rackspace-monitoring-agent.exe" -o --setup

    This will launch the agent setup interface.

  4. Enter your Rackspace Cloud user name when prompted.

  5. Enter either your API key or Control Panel password when prompted.

    Note that this entry displays in clear text while it is typed; using the API key instread of your password is recommended.  Neither value is stored in cleartext, it is only used for this initial authentication.

  6. If this is your first time running the setup program you will be prompted to choose an agent token. Select the "Create a New Token" option.

    You should see the message Agent successfully connected!

  7. At the next prompt, you should see a list of Cloud Monitoring entities. If only one entity is listed, select option 1 to associate the agent with that entity. If you see more than one entity listed, choose the one that matches your cloud server based on the IP addresses listed.

    Tip: A Cloud Monitoring entity is created automatically for every Rackspace Cloud Server on your account. If you install the agent on a dedicated server, or a server not hosted with Rackspace, including a server in a Rackspace private cloud, no entities are listed. Choose the option to create one. If you create a new monitoring entity on your server, it won't be visible in the Cloud Control Panel, but it you can configure it with the monitoring API using raxmon; for details, see Getting Started with Remote Monitoring.

Now it's time to start the agent.

Start the Agent

On Linux, start the agent by running:

sudo service rackspace-monitoring-agent start

On Windows, to start the agent open the Service Manager (click Start, click Control Panel, double-click Administrative Tools, and then double-click Service), locate the "Rackspace Monitoring Agent" service, right click on it, then select Start. If you just configured the agent, but the service appears to be already running, you will need to restart it before the agent will connect.

Note: You can use the rackspace-monitoring-agent command to manage the agent. To see the command options, enter:

rackspace-monitoring-agent --help

The agent is now connected to your Cloud Server and will immediately start gathering host information. You can use the API to get host information programmatically or open the Cloud Control Panel and view host metrics on the Server Details page.

Upgrade the Agent

The agent does not upgrade itself, though if you've added the agent repository to a Linux system the agent will be updated when you run a system update.  For Windows and other systems without the agent in a package repository, the agent will have to be upgraded manually.

We recommend that you upgrade the agent every three to four weeks.

Uninstall the Agent

Use the standard method for your operating system to uninstall the agent.

On Ubuntu and Debian systems, run:

sudo apt-get remove rackspace-monitoring-agent

On CentOS, Red Hat, and Fedora, run:

sudo yum remove rackspace-monitoring-agent

On Windows, use the Add/Remove Programs utility in the Windows Control Panel.

Next Steps

Once you have installed the monitoring agent, the next steps are to create "checks" to gather metrics (specific data points) and alarms that trigger a notification at certain thresholds. You will also need to create a notification and notification plan. See Rackspace Cloud Monitoring Checks and Alarms and Creating a Monitoring Check Using the Control Panel for details on doing this using the Control Panel.

Related Information

About the Monitoring Agent

Troubleshooting the Monitoring Agent

© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

See license specifics and DISCLAIMER