15. 05. 2018 Davide Bizzarri APM, NetEye, Unified Monitoring

How to monitor docker containers using cAdvisor [ Part 2 ]

Introduction

In this second part of the tutorial we will create a Grafana dashboard to visualize the performance data that we have collected in the first part of the tutorial that can be found here: How to monitor docker containers using cAdvisor [ Part 1 ]

1. Create a new Data Source

The first thing we need to do is create and configure a new Data Source for Grafana.

  1. Click on the Grafana icon at the top left
  2. From the drop down menu, select Data Source
  3. Then click on Add data source
  4. Fill in the Data Source as in this screenshot  (password: root)
    blog_cadvisor_03_screenshot

    The configuration of the Data Source can be different if you are not using NetEye.

  5. Finally, click on Save & Test

2. Create a new Dashboard

Now we are going to create a new dashboard to visualize the disk usage of our docker host machine.

  1. Click on the Grafana icon at the top left
  2. From the drop down menu, select Dashboards
  3. Then click on New
  4. From the new page, click on Add Panel
  5. Then select Graph from the menu strip above the empty panel
    blog_cadvisor_05_screenshot
  6. Click on the title of the new Graph and select Edit.
  7. Now create the new metrics with the parameters as in this screenshot:
    blog_cadvisor_04_screenshot
  8. We can edit the title of the Graph from the General tab.
  9. We can select bytes as unit for our Metrics from the Axes tab.
    blog_cadvisor_06_screenshot
  10. Finally we can save our dashboard by clicking on Save at the top of the page.

Conclusions

In this tutorial we have seen just one example, but it’s possible to create graphs to visualize CPU usage, memory usage and network traffic. You can find more examples here: Docker Monitoring.

blog_cadvisor_07_screenshot

Davide Bizzarri

Davide Bizzarri

R&D Software Engineer at Würth Phoenix
Hi, I'm Davide! I’m a full stack developer at Würth Phoenix. I started to use a PC at the age of ten when my parents bought our first family PC: an old Windows 98. Then, in high school, my professor introduced me to the world of software development by teaching me my first programming language, C. Since then I began to study IT and programming languages alone. After one year, I started to develop my first website that reached over one thousand views per day. Once I finished high school, I changed my job twice, until Würth Phoenix has hired me. Here I have learned many interesting things, one of the most important once is the agile development methodology which we living every day.

Author

Davide Bizzarri

Hi, I'm Davide! I’m a full stack developer at Würth Phoenix. I started to use a PC at the age of ten when my parents bought our first family PC: an old Windows 98. Then, in high school, my professor introduced me to the world of software development by teaching me my first programming language, C. Since then I began to study IT and programming languages alone. After one year, I started to develop my first website that reached over one thousand views per day. Once I finished high school, I changed my job twice, until Würth Phoenix has hired me. Here I have learned many interesting things, one of the most important once is the agile development methodology which we living every day.

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive