Monitor CoreOS at scale with Datadog
CoreOS was designed to support deployment sizes ranging from a single machine to warehouse scale, which pushes traditional monitoring solutions to their limits. The distributed nature of environments running CoreOS requires a monitoring solution that is easy to install, configure, and can handle the load of an entire datacenter pushing metrics simultaneously.
Datadog makes it easy to roll out a complete monitoring solution in minutes that can handle the warehouse scale that CoreOS enables. Datadog also sports a deep collection of plugins and integrations, which means you can monitor pretty much anything with minimal effort.
Today we are proud to announce that all of that Datadog goodness works on CoreOS.
The following tutorial will help you get the Datadog Agent installed in less than 5 minutes. Before we start, be sure to set up a Datadog free trial.
Install Datadog on CoreOS
First, obtain your Datadog API key from the API page inside the Datadog application. With the API key in hand you can use
etcd, the CoreOS distributed configuration database, to expose the API key cluster-wide. Simply log in to any node in the cluster and set the Datadog API key using the
etcdctl command line tool.
etcdctl set /ddapikey c0re0s070120131499294110c0re0sdd
Run the Datadog Agent
Next you need to install the Datadog Agent, which is responsible for collecting and sending metrics to the hosted Datadog service. For quick testing you can use the Docker command line tool to run the official Datadog Docker container.
docker run -d --privileged --name dd-agent -h hostname` -v /var/run/docker.sock:/var/run/docker.sock -v /proc/mounts:/host/proc/mounts:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e API_KEY=`etcdctl get /ddapikey` datadog/docker-dd-agent
It should be noted that CoreOS recommends running all applications from a container whenever possible. Following this bit of advice makes application installation and upgrades a snap—just launch a new container and you’re done.
Datadog screenboards and dashboards
As soon as the install is complete, you can customize a screenboard, like the one below, to show aggregate container metrics over your cluster.
Monitoring at any scale can be a challenge. Datadog aims to ease the pain of monitoring through a streamlined installation process, pretty graphs, and most importantly, a complete view into your entire infrastructure. While this post focused on getting the Datadog Agent up and running, there is a lot more Datadog can do including data analytics and application level monitoring.
If you would like to easily monitor CoreOS infrastructure, try out Datadog for free with a 14-day trial. Metrics for CoreOS-based containers will be immediately available after installing the Datadog Agent.