6.2 Monitor Docker containers usage, performance and metering

Information

Containers might run services that are critical for your business. Monitoring their usage,
performance and metering would be of paramount importance.Tracking container usage, performance and having some sort of metering around them
would be important as you embrace the containers to run critical services for your
business. This would give you. Capacity Management and Optimization
. Performance Management
. Comprehensive VisibilitySuch a deep visibility of container performance would help you ensure high availability of
containers and minimum downtime.

Solution

Use a software or a container for tracking container usage, reporting performance and
metering.Impact-To get container metrics, you would have to utilize another container in privileged mode or
a software that can enter namespace of various containers. Giving unrestricted access to
namespaces of all the containers might be too risky.
Default Value-By default, for each container, runtime metrics about CPU, memory, and block I/O usage is
tracked by the system via enforcement of control groups (cgroups) as below-CPU - /sys/fs/cgroup/cpu/system.slice/docker-$INSTANCE_ID.scope/Memory - /sys/fs/cgroup/memory/system.slice/docker-$INSTANCE_ID.scope/
Block I/O - /sys/fs/cgroup/blkio/system.slice/docker-$INSTANCE_ID.scope/

See Also

https://workbench.cisecurity.org/files/517