Easy AWS Monitoring using CloudWatch envimation

CloudWatch envimation

In our previous blog post we talked about CloudWatch Dashboards and how to create them using either AWS console or AWS CLI. We also covered some of the difficulties arising when your infrastructure grows, and you want to get the most out of the available CloudWatch metrics.

Let’s quickly wrap up pros and cons of using CloudWatch dashboards for data visualisation.

PROs

  • No external agents required, in fact, no configuration on your existing EC2 instances required
  • Access to your data visualisation and monitoring within AWS, using IAM users and roles
  • Native AWS Managed solution, so no need for external service management.

CONs

  • Growing size of dashboard body definition
  • Changing infrastructure and the burden of updating the CloudWatch definition, every time you terminate an instance, upscale or downscale your service

To keep the pros and reduce the maintenance and setup effort, we created CloudWatch envimation - a growing list of REST endpoints, which strive to provide easier setup of CloudWatch dashboards and reduce the need of maintaining and keeping Dashboard content up-to-date with your infrastructure.

By making HTTP calls to our endpoints you can

  1. Create dashboards for all available EC2 metrics in a chosen region
  2. Specify a subset of instances using their Name tag
  3. Remove the burden of maintaining the Dashboard body definition
  4. View EBS volume Metrics together with the instances they belong to

By including the calls to our endpoints into your automation solutions, you can

  1. Deploy monitoring of your instances together with the infrastructure
  2. Keep your monitoring up-to-date with your infrastructure changes

In this blog post, we will see how to start using envimation for CloudWatch Dashboards.

Setting up envimation

Subscribe to the product

Our endpoints are made available for you using AWS Marketplace SaaS subscriptions. It’s an HTTP endpoint, by making requests to which you can instruct our software to create and update CloudWatch Dashboards for you. You are billed only when you make requests to our endpoint, on per-request bases, 5 cents per request. Since it’s integrated with the AWS Marketplace, you receive the envimation product usage bill together with your usual AWS bill. Let’s go through the initial setup of envimation in your account.

  1. First off, you would need to login into your AWS account.
  2. Navigate to CloudWatch envimation product page
  3. Click “Subscribe”

At this point, you are redirected to our website, where you would need to create an account and get access to an API token. You use this token to make authenticated requests to our endpoints.

Register at envimation

Create trust role

For our service to be able to create dashboards in your account, you would need to give permissions to us to do so. This is achieved by creating a trust-role between our service account and your target account. Only permissions we would need for this endpoint are the EC2 list, and naturally, CloudWatch write permissions.

We have prepared a CloudFormation template for you, as well as aws CLI commands to create the trust role quickly.

Apply Trust Role

After the role has been set up, you can now start using our endpoints!

Make requests

Let’s see how we can create dashboards using the service.

To authorise requests to envimation endpoints, you would need to include your API Key in the requests. You can access your API key at any point, while being logged in, in the upper-right menu. Every request you make to envimation must contain this key, as a value of header field x-api-key.

In the third step of the “getting-started” page, you can see an example request with the pre-populated x-api-key header.

curl -X POST \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'x-api-key: <YOUR_API_KEY>' \
    -d '{"accountId": "<YOUR_ACCOUNT_ID>", "region": "<DESIRED_REGION>"}' \
    'https://api.envimation.com/dashboards'
Make Request

If you navigate now to CloudWatch dashboards, you can see a new dashboard created. The default name is “Envimation-EC2”, and you can customise that by specifying the field dashboardName in the request JSON.

More information about the product you can find on the CloudWatch envimation product page And to get started visit the Getting started page

We are happy to receive your feedback and requests regarding more APIs to make AWS usage easier.