Monitoring Docker containers

Article ID: 472
Category: Monitoring
Applies to: 5.0.1.84
Updated: 2022-08-18

The CPU and memory utilization of each container as well as the number of docker containers currently running can be monitored using EventSentry's performance monitoring feature and PowerShell scripts.

The following 3 scripts are available under Scripts -> Managed in the management console:

docker_containers_count.ps1
Monitors the number of running containers.

docker_containers_cpu.ps1
Enumerates every running container and their CPU utilization.

docker_containers_memory.ps1
Enumerates every running container and their memory usage.

These scripts need to be assigned to a performance monitoring package in order to return performance stats:

  • Create a new System Health package Docker
  • Make the package global
  • Edit the package properties and enable Dynamic Activation for Installed Services: docker
docker package properties
  • Add a Performance/SNMP object to the package
  • Add 3 new counters with the following properties:
docker performance monitoring

Name: Docker Running Containers
Executable: @docker_containers_count.ps1

Name: Docker Containers CPU
Executable: @docker_containers_cpu.ps1
Instances: See screenshot below

Name: Docker Containers Memory
Executable: @docker_containers_mem.ps1
Instances: See screenshot below

Configuring instances for cpu and mem counters

Configuring instances for CPU and MEM counters


Configure Alerts and History & Trending for all counters accordingly, e.g. write to database every 15 minutes.



Try EventSentry on-premise

FREE 30-day evaluation

Download Now