Docker metrics

For each container, Zabbix discovers the following metrics that will be recorded:

  • Container (your Containers name) is running
  • CPU system time
  • CPU user time
  • Used cache memory
  • Used RSS memory
  • Used swap

Apart from "Used swap", these are the same metrics recorded by cAdvisor.

Create custom graphs

You can access a time-based graph for any of the metrics collected by Zabbix; you can also create your own custom graphs. In the following graph, I have created a graph that plots all the CPU System stats from the three web containers we launched earlier in the chapter:

Create custom graphs

As you can see, I performed a few tests using ApacheBench to make the graph a little more interesting.

For more information on how to create custom graphs, see the graphs section of the documentation site at https://www.zabbix.com/documentation/2.4/manual/config/visualisation/graphs.

Compare containers to your host machine

As we added the Linux OS template and the Docker template to the host and we are also recording quite a lot of information about the system, here we can tell the effect the testing with ApacheBench had on the overall processor load:

Compare containers to your host machine

We can drill down further to get information on the overall utilization:

Compare containers to your host machine
Compare containers to your host machine

Triggers

Another feature of Zabbix is triggers: you can define actions to happen when a metric meets a certain set of criteria. In the following example, Zabbix has been configured with a trigger called Container Down; this changes the status of the monitored item to Problem with a severity of Disaster:

Triggers

This change in status then triggers an e-mail to inform that, for some reason the container is no longer up and running:

Triggers

This could have also triggered other tasks, such as running a custom script, sending an instant message via Jabber, or even triggering a third-party service such as PagerDuty (https://www.pagerduty.com) or Slack (https://slack.com).

For more information on Triggers, Events, and Notifications, see the following sections of the documentation:

Triggers
Triggers
Triggers
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset