Dockers Monitoring Tools

Deep Dive into Docker Logging
November 24, 2017
How are Big Companies using Apache Spark
December 17, 2017
Show all

Dockers Monitoring Tools

Monitoring tools are handy option for a smooth functioning of your ops. If properly configured, logs and visual data can make a huge difference during troubleshooting.
Below are some Docker monitoring tools that you can choose for your environment depending upon your needs.

Docker Stat

Every Docker container shipped with a pre-configured monitoring tool which is Docker Stat.
Following command gives statistics of docker CPU utilization, memory usage, memory limit, and network IO metrics.
            $ docker stats [CONTAINER...]
The first command ‘docker’ is a base command for docker CLI. you can specify one or more containers separated by spaces to get information about each.
Following command will show detail of all containers running on Linux daemon
            $ docker stats
To get more detail information about a container’s resource usage, use the /containers/(id)/stats API endpoint.
Following is snapshot of ‘docker stats’ output

It’s biggest plus is its free and shipped with docker container, so you don’t need to do any configuration setting as is the case with third party tool. You can get detail about various metrics with few variations of command.
Its cons is that unlike other monitoring tools its only limited to docker and can’t give you statistics of other resources running in parallel with docker. Its biggest limitation is that it is unable to generate an alarm in case anything go wrong and is only CLI based.

cAdvisor

cAdvisor is another tool to see resource usage and performance characteristics of containers. cAdvisor has native support for Docker but will work with any other container as well.

cAdvisor provides a visual representation of your docker statistics. Once you have cAdvisor configured and running on your machine. You can access its web interface by typing http://localhost:8080 in your web browser. This web interface will give statistics of total CPU utilization, Memory usage, Network throughput and disk space utilization. You can see statistics of a specific container by clicking the Docker Containers link and then choosing container you want to see.
Following graph shows Total CPU usage of Host

cAdvisor provides a visual representation of your docker statistics. Once you have cAdvisor configured and running on your machine. You can access its web interface by typing http://localhost:8080 in your web browser. This web interface will give statistics of total CPU utilization, Memory usage, Network throughput and disk space utilization. You can see statistics of a specific container by clicking the Docker Containers link and then choosing container you want to see.
Following graph shows Total CPU usage of Host

Its free open source and is easy to configure on a cluster.
On the downside, it can only monitor one docker host and is not suitable for multi-node deployment, as your stats will be disjoint and spread throughout your cluster. The moving data in the graphs is of one minute only and there is no option if you want to increase the timings. Like docker Stats, cAdvisor also don’t trigger alerts and don’t provide an option to monitor non-docker resources.

Scout

Scout is new server monitoring application for dev teams, that allow automatic monitoring of key metrics, has 80+ plugins for monitoring your apps, real-time (every second) streaming dashboards and provides an alert feature.
If you have a docker environment, ‘docker-scout’ is Scout app based container with which you can monitor your host and containers.
Scout gives you details like CPU usage and memory utilization for everything running on your host and these are not limited to specific processes running inside docker.
Once you have ‘docker-scout’ plug-in configured, you can import data from containers like CPU usage, memory usage network throughput and the number of containers for each host. The data is available in statistical form as well as in graphical form.

The drawback is that unlike cAdvisor, it doesn’t give detail information about individual containers running on each host. This is a serious limitation if you have different containers hosted on the same server. Also, these added features come at a price, ten dollars per monitored hosts.

Datadog

With Datadog gives you can get Docker metrics of all your Dockers running on a host using one Datadog Agent per host. There are two ways you can run Datadog Agent, directly on each host or within a docker-dd-agent container.


With Datadog you can see metrics like CPU usage, memory and I/O for all containers running on the host. Also, you get counts of running and stopped containers as well as counts of docker images.
Datadog has an interactive dashboard that lets you create a graph of any performance metric. With Datadog Monitor feature you can set alerts in case some metric crosses threshold value.
You can also get aggregate data of some metrics to help debug issues or extract specific information from data, all this comes in Metrics Explorer feature.
Datadog is way ahead of three discussed so far but on the downside it has a fee of 15$ per agent.

Sensu Monitoring Framework

Sensu is a free open source, and self-hosted, centralized metrics service. You can use hiroakis/docker-sensu-server container for running Sensu. Sensu has no native support for Docker, but you can use the plug-in to configure support for container metrics as well as status checks.


Sensu is a great tool that has all feature a monitoring tool should have. You can get as much detail about host and Docker container as much you want. You can also aggregate data and set alerts over that aggregated data.


On the downside, Sensu alerting is not as much advanced. Although comes with so many features, it’s not easy to configure with Docker and you have to work hard to make it work with Docker.

Sysdig Cloud

Sysdig cloud is a hosted service with complete monitoring features like metrics storage, aggregation, visualization and alerting. To use Sysdig Cloud first you have to sign up to its site and you have to configure your docker environment with Sysdig, in order to start monitoring with Sysdig Cloud.
Once you have done with configuration, you can see data like CPU usage, memory consumption, network usage in Sysdig cloud. The metrics are aggregated for the host as well as broken down per container.
Sysdig is easy to setup, gives detail output of metrics in graphs for real-time and historical data. Alert system in Sysdig is best among the other five we have seen so far.
Price model of Sysdig cloud is not clear, once it’s cleared it will be best monitoring tool.
Following is a view of Sysdig cloud Dashboard


Conclusion

We have seen six docker monitoring tools, some were free while some were priced. DataDog has an edge over all others as its very easy to setup with one single command, all hosts were reporting metrics at a unified location, historical data can also be analyzed. Datadog also supports alerting. Datadog price of $15 per host makes it an expensive choice for large setups.
For larger deployments, free and open source Sensu is an ideal choice. However, this free functionality comes at the cost of complexity in setting it up. There is no decisive winner in the end, as which monitoring tool you require depends solely on your requirements.

 


Check out Jame’s Latest PDF book on DevOps


GuideDevOps9x7x1LandscapeHB1 (1)

James Lee
James Lee
James Lee is a passionate software wizard working at one of the top Silicon Valley-based startups specializing in big data analysis. In the past, he has worked on big companies such as Google and Amazon In his day job, he works with big data technologies such as Cassandra and ElasticSearch, and he is an absolute Docker technology geek and IntelliJ IDEA lover with strong focus on efficiency and simplicity.

5 Comments

  1. Aman Kross says:

    Great insight! Thanks James!

  2. Jevgeni says:

    Cleared my confusion about how to choose between Scout and datadog! Many thanks.

  3. Marcin Kumar says:

    look forward for more posts regarding Docker monitoring strategies.

  4. Krishnan Sriram Rama says:

    Nice write. Thanks James

  5. Vincent says:

    Please have a look at Dynatrace 😉
    Docker, OpenShift, Kubernetes… monitored with Dynatrace
    https://www.dynatrace.com/support/help/infrastructure/containers/how-do-i-monitor-docker-containers/

Leave a Reply

Your email address will not be published.

LEARN HOW TO GET STARTED WITH DEVOPS

get free access to this free guide, downloaded over 200,00 times !

You have Successfully Subscribed!

Level Up Big Data Pdf Book

LEARN HOW TO GET STARTED WITH BIG DATA

get free access to this free guide, downloaded over 200,00 times !

You have Successfully Subscribed!