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

Monitor Like A Pro With Server-Side Configuration

We’ve heard your feedback: you want to apply preferred configurations across your entire environment, and you want it to be fast. You want to save and iterate on your favored set-up and use it as a template that can be shared. You want to update configurations in mere seconds. Server-side Configuration gives you what you’ve been asking for: configuration files that can be easily updated, shared, and used with automation tools.

How do I get started?

Start by creating a configuration file written in YAML [1] format with one monitoring check, and one or more monitoring alarms. Save the file to the rackspace-monitoring-agent.conf.d directory on the target server. Upon agent restart, the agent will upload the file to the monitoring service and set up the desired configuration for your target server. The location of the conf.d directory will depend on your Operating System, and might require an administrator role.

Example for Linux:

vi /etc/rackspace-monitoring-agent.conf.d/main_disk_check.yaml

Example for Windows:

notepad "C:\ProgramData\Rackspace Monitoring\config\rackspace-monitoring-agent.conf.d\main_disk_check.yaml"

Contents of main_disk_check.yaml:

type        : agent.filesystem
label       : Check for Main Disk
disabled    : false
period      : 60
timeout     : 30
details     :
  target  : /
alarms      :
  alarm1  :
      label                 : disk used alarm
      notification_plan_id  : npTechnicalContactsEmail
      criteria              : |
          if (percentage(metric['used'], metric['total']) > 90) {
              return new AlarmStatus(CRITICAL, 'Less than 10% free space left - #{used} used out of #{total}');
          }
          if (percentage(metric['used'], metric['total']) > 80) {
              return new AlarmStatus(WARNING, 'Less than 20% free space left - #{used} used out of #{total}');
          }

Using the Agent with Server-side Configuration

For this feature to work as expected, make sure your agent (version 1.0.0-68 or later) has been setup and connected to the target server. When the agent starts up, it will create the check and alarms from the file. If a Server-side Configuration file is removed, then the agent will delete the check and corresponding alarms. If parameters have changed within a Server-side Configuration file, the agent will update the corresponding check and alarms upon agent restart. Check out our Getting Started Guide for full details on how to use this new feature.

Automate with Ansible

Making use of this new feature using Ansible is simple. Start by applying the role Rackspace_Automation.cloud-monitoring-agent to your server. This role ensures that the agent is installed on your server, and then configures four checks by default:

  • agent.filesystem
  • agent.memory
  • agent.cpu
  • agent.load_average

When using the Rackspace Automation role with Ansible, any changes to the rendered files will cause the cloud monitoring agent to restart, so that your changes take effect. Alarms are not configured, but you can enable them by passing 'cloud_monitoring_$check_alarm: True'. You can set up additional checks by defining the cloud_monitoring_additional_checks variable.

Additionally, you can use the Ansible template module to drop in your own configuration files. Check out our templated YAML files, which allow you to automatically configure Cloud Monitoring on any servers managed by Ansible. The template directory offers examples of the checks included with the Ansible role.

Don’t want to handle configuration yourself? Our DevOps Automation experts can deploy monitoring and respond to the alerts, giving you more time to focus on what matters most – your core business.

Contact

Server-side Configuration will help you quickly install and configure Cloud Monitoring, whether your target machine is hosted on our cloud, in your data center, or on another public cloud.

Got questions or comments? Feel free to contact us at monitoring@rackspace.com or in our Customer Forum.

[1] For additional information about syntax, characters, and structures of YAML, please refer to YAML Specifications.

Rackers Matthew Thode and Ryan Phillips contributed to this post.

About the Author

This is a post written and contributed by Rob Emanuele and Justin Phelps.

Rob Emanuele is an Engineer in Rackspace Monitoring. Previously he worked in embedded software, hardware design, game programming, and telephony. In free time, he plays with his kids and tinkers with high power rocketry and electronic design.

Justin Phelps is a DevOps Engineer at Rackspace. Justin started his career as a Racker on Halloween, 2011 as a Linux Administrator in Managed Cloud. He moved to Marquee in 2012 to support Managed Cloud's largest customers. Today, Justin works with the Rackspace DevOps group to help automate customer workloads. He also maintains a personal technical blog at www.onitato.com.


More
Racker Powered
©2014 Rackspace, US Inc.