For each container, Zabbix discovers the following metrics that will be recorded:
Apart from "Used swap", these are the same metrics recorded by cAdvisor.
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:
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.
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:
We can drill down further to get information on the overall utilization:
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:
This change in status then triggers an e-mail to inform that, for some reason the container is no longer up and running:
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: