Monitor Your AWS ECS Platform With Convox and Datadog | Datadog

Monitor your AWS ECS platform with Convox and Datadog

Author Noah Zoschke
@nzoschke

Published: December 23, 2016

This is a guest post by Noah Zoschke, CTO at Convox, an application platform-as-a-service built on top of Docker and AWS.

Cloud automation is taking over. When your team is constantly deploying to a Platform-as-a-Service like Convox, these scenarios are increasingly common:

  • A developer pushes to GitHub, triggering automatic creation of new cloud services and containers for testing the branch.
  • A developer merges to GitHub, triggering automatic rollout of new containers and images to production.
  • An app automatically scales up or down according to load.
  • A service automatically removes and replaces parts of the cloud infrastructure due to failures.

To make sense of all the moving pieces behind automation engineers rely on excellent monitoring software. Datadog is designed precisely for monitoring these dynamic cloud environments and can quickly add operational visibility to a Convox environment.

Set up Convox

The open-source Convox PaaS sets up a production-ready platform in minutes. First set up the AWS and Convox CLI tools:

$ brew install convox

Next, a single command with the Convox CLI creates a production-ready container platform:

$ convox install
	 ___    ___     ___   __  __    ___   __  _
    / ___\ / __ \ /  _  \/\ \/\ \  / __ \/\ \/ \
   /\ \__//\ \_\ \/\ \/\ \ \ \_/ |/\ \_\ \/>  </
   \ \____\ \____/\ \_\ \_\ \___/ \ \____//\_/\_\
    \/____/\/___/  \/_/\/_/\/__/   \/___/ \//\/_/

Installing Convox (20161102160040)...
Created ECS Cluster: example-Cluster-8BMH9ZW0JY30
...
Done.

Finally, deploy your first application.

For the demo below we’ll use an example Node.js app:

$ git clone https://github.com/convox-examples/convox-guide

$ cd convox-guide

$ convox apps create

$ convox deploy

If you don’t have an account already, sign up for Datadog. You’ll need an API key that lets you send data from Convox instances to the Datadog service.

Deploy the Datadog Agent

Under the hood, Convox leverages AWS EC2 Container Service (ECS). Datadog has good docs on how to integrate with ECS. Their guide walks you through creating an ECS Task, modifying IAM roles, and writing user data scripts.

The Convox platform is designed to simplify AWS platform use, allowing you to deploy the Datadog agent as a Convox app:

# check out the repo
$ git clone https://github.com/convox-examples/dd-agent.git
$ cd dd-agent

# create the app and secrets
$ convox apps create
$ convox env set API_KEY=<your api key>
$ convox deploy
$ convox scale agent --count=3 --cpu=10 --memory=128


# monitor the agent
$ convox logs
2016-12-07T18:24:02Z agent:0.70/i-603780f8 Starting agent process 8d510c19e42c
2016-12-07T18:24:02Z agent:0.70/i-f6dad10e Starting agent process a3ade3d781d1
2016-12-07T18:24:02Z agent:0.70/i-a89a51bf Starting agent process 96d1195ed218
2016-12-07T18:24:03Z agent:RADWUQIPBCQ/8d510c19e42c 2016-12-07 18:24:03,173 INFO supervisord started with pid 1

Dashboards!

Within seconds, data starts flowing into Datadog. You can now see lots of graphs that visualize how your apps are running on Convox.

monitor aws ecs convox

See the Monitor Docker on AWS ECS blog for more information.

Next steps

Now that the data is flowing, you can use Datadog to:

  • Integrate with the rest of your AWS account
  • Build custom dashboards
  • Set up monitors and alerts
monitor aws ecs convox

Most importantly, with easy setup and sophisticated visibility tooling, you can focus on your apps instead of worrying about your infrastructure.