This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/collector/components/contrib/dockerstatsreceiver.md.

Docker Stats Receiver

OpenTelemetry Collector receiver · contrib distribution

The Docker Stats receiver queries the local Docker daemon's container stats API for all desired running containers on a configured interval. These stats are for container resource usage of cpu, memory, network, and the blkio controller.

  • Component ID: contrib-dockerstatsreceiver
  • Name: dockerstatsreceiver
  • Type: receiver
  • Distribution: contrib
  • Repository: opentelemetry-collector-contrib

Stability

LevelSignals
alphametrics

Metrics

MetricTypeValue typeUnitStabilityEnabledAttributesDescription
container.blockio.io_merged_recursivesum (monotonic)int{operations}developmentnodevice_major (string), device_minor (string), operation (string)Number of bios/requests merged into requests belonging to this cgroup and its descendant cgroups (Only available with cgroups v1). More docs.
container.blockio.io_queued_recursivesum (monotonic)int{operations}developmentnodevice_major (string), device_minor (string), operation (string)Number of requests queued up for this cgroup and its descendant cgroups (Only available with cgroups v1). More docs.
container.blockio.io_service_bytes_recursivesum (monotonic)intBydevelopmentyesdevice_major (string), device_minor (string), operation (string)Number of bytes transferred to/from the disk by the group and descendant groups. More docs for cgroups v1 and cgroups v2
container.blockio.io_service_time_recursivesum (monotonic)intnsdevelopmentnodevice_major (string), device_minor (string), operation (string)Total amount of time in nanoseconds between request dispatch and request completion for the IOs done by this cgroup and descendant cgroups (Only available with cgroups v1). More docs.
container.blockio.io_serviced_recursivesum (monotonic)int{operations}developmentnodevice_major (string), device_minor (string), operation (string)Number of IOs (bio) issued to the disk by the group and descendant groups (Only available with cgroups v1). More docs.
container.blockio.io_time_recursivesum (monotonic)intmsdevelopmentnodevice_major (string), device_minor (string), operation (string)Disk time allocated to cgroup (and descendant cgroups) per device in milliseconds (Only available with cgroups v1). More docs.
container.blockio.io_wait_time_recursivesum (monotonic)intnsdevelopmentnodevice_major (string), device_minor (string), operation (string)Total amount of time the IOs for this cgroup (and descendant cgroups) spent waiting in the scheduler queues for service (Only available with cgroups v1). More docs.
container.blockio.sectors_recursivesum (monotonic)int{sectors}developmentnodevice_major (string), device_minor (string), operation (string)Number of sectors transferred to/from disk by the group and descendant groups (Only available with cgroups v1). More docs.
container.cpu.limitgaugedouble{cpus}developmentnoCPU limit set for the container. This metric is only reported if the container has limits set with -cpus, -cpuset-cpus or -cpu-quota.
container.cpu.logical.countgaugeint{cpus}developmentnoNumber of cores available to the container.
container.cpu.sharesgaugeint1developmentnoCPU shares set for the container.
container.cpu.throttling_data.periodssum (monotonic)int{periods}developmentnoNumber of periods with throttling active.
container.cpu.throttling_data.throttled_periodssum (monotonic)int{periods}developmentnoNumber of periods when the container hits its throttling limit.
container.cpu.throttling_data.throttled_timesum (monotonic)intnsdevelopmentnoAggregate time the container was throttled.
container.cpu.usage.kernelmodesum (monotonic)intnsdevelopmentyesTime spent by tasks of the cgroup in kernel mode (Linux). Time spent by all container processes in kernel mode (Windows).
container.cpu.usage.percpusum (monotonic)intnsdevelopmentnocore (string)Per-core CPU usage by the container (Only available with cgroups v1).
container.cpu.usage.systemsum (monotonic)intnsdevelopmentnoSystem CPU usage, as reported by docker. Note this is the usage for the system, not the container.
container.cpu.usage.totalsum (monotonic)intnsdevelopmentyesTotal CPU time consumed.
container.cpu.usage.usermodesum (monotonic)intnsdevelopmentyesTime spent by tasks of the cgroup in user mode (Linux). Time spent by all container processes in user mode (Windows).
container.cpu.utilizationgaugedouble1developmentyesPercent of CPU used by the container.
container.memory.active_anonsumintBydevelopmentnoThe amount of anonymous memory that has been identified as active by the kernel.
container.memory.active_filesumintBydevelopmentnoCache memory that has been identified as active by the kernel. More docs
container.memory.anonsumintBydevelopmentnoAmount of memory used in anonymous mappings such as brk(), sbrk(), and mmap(MAP_ANONYMOUS) (Only available with cgroups v2). More docs
container.memory.cachesumintBydevelopmentnoThe amount of memory used by the processes of this control group that can be associated precisely with a block on a block device (Only available with cgroups v1).
container.memory.dirtysumintBydevelopmentnoBytes that are waiting to get written back to the disk, from this cgroup (Only available with cgroups v1).
container.memory.failssum (monotonic)int{fails}developmentnoNumber of times the memory limit was hit.
container.memory.filesumintBydevelopmentyesAmount of memory used to cache filesystem data, including tmpfs and shared memory (Only available with cgroups v2). More docs
container.memory.hierarchical_memory_limitsumintBydevelopmentnoThe maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1).
container.memory.hierarchical_memsw_limitsumintBydevelopmentnoThe maximum amount of RAM + swap that can be used by the processes of this control group (Only available with cgroups v1).
container.memory.inactive_anonsumintBydevelopmentnoThe amount of anonymous memory that has been identified as inactive by the kernel.
container.memory.inactive_filesumintBydevelopmentnoCache memory that has been identified as inactive by the kernel. More docs
container.memory.mapped_filesumintBydevelopmentnoIndicates the amount of memory mapped by the processes in the control group (Only available with cgroups v1).
container.memory.percentgaugedouble1developmentyesPercentage of memory used. Not supported on Windows.
container.memory.pgfaultsum (monotonic)int{faults}developmentnoIndicate the number of times that a process of the cgroup triggered a page fault.
container.memory.pgmajfaultsum (monotonic)int{faults}developmentnoIndicate the number of times that a process of the cgroup triggered a major fault.
container.memory.pgpginsum (monotonic)int{operations}developmentnoNumber of pages read from disk by the cgroup (Only available with cgroups v1). More docs.
container.memory.pgpgoutsum (monotonic)int{operations}developmentnoNumber of pages written to disk by the cgroup (Only available with cgroups v1). More docs.
container.memory.rsssumintBydevelopmentnoThe amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps (Only available with cgroups v1).
container.memory.rss_hugesumintBydevelopmentnoNumber of bytes of anonymous transparent hugepages in this cgroup (Only available with cgroups v1).
container.memory.total_active_anonsumintBydevelopmentnoThe amount of anonymous memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1).
container.memory.total_active_filesumintBydevelopmentnoCache memory that has been identified as active by the kernel. Includes descendant cgroups (Only available with cgroups v1). More docs.
container.memory.total_cachesumintBydevelopmentyesTotal amount of memory used by the processes of this cgroup (and descendants) that can be associated with a block on a block device. Also accounts for memory used by tmpfs (Only available with cgroups v1). Not supported on Windows.
container.memory.total_dirtysumintBydevelopmentnoBytes that are waiting to get written back to the disk, from this cgroup and descendants (Only available with cgroups v1).
container.memory.total_inactive_anonsumintBydevelopmentnoThe amount of anonymous memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1).
container.memory.total_inactive_filesumintBydevelopmentnoCache memory that has been identified as inactive by the kernel. Includes descendant cgroups (Only available with cgroups v1). More docs.
container.memory.total_mapped_filesumintBydevelopmentnoIndicates the amount of memory mapped by the processes in the control group and descendant groups (Only available with cgroups v1).
container.memory.total_pgfaultsum (monotonic)int{faults}developmentnoIndicate the number of times that a process of the cgroup (or descendant cgroups) triggered a page fault (Only available with cgroups v1).
container.memory.total_pgmajfaultsum (monotonic)int{faults}developmentnoIndicate the number of times that a process of the cgroup (or descendant cgroups) triggered a major fault (Only available with cgroups v1).
container.memory.total_pgpginsum (monotonic)int{operations}developmentnoNumber of pages read from disk by the cgroup and descendant groups (Only available with cgroups v1).
container.memory.total_pgpgoutsum (monotonic)int{operations}developmentnoNumber of pages written to disk by the cgroup and descendant groups (Only available with cgroups v1).
container.memory.total_rsssumintBydevelopmentnoThe amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps. Includes descendant cgroups (Only available with cgroups v1).
container.memory.total_rss_hugesumintBydevelopmentnoNumber of bytes of anonymous transparent hugepages in this cgroup and descendant cgroups (Only available with cgroups v1).
container.memory.total_unevictablesumintBydevelopmentnoThe amount of memory that cannot be reclaimed. Includes descendant cgroups (Only available with cgroups v1).
container.memory.total_writebacksumintBydevelopmentnoNumber of bytes of file/anon cache that are queued for syncing to disk in this cgroup and descendants (Only available with cgroups v1).
container.memory.unevictablesumintBydevelopmentnoThe amount of memory that cannot be reclaimed.
container.memory.usage.limitsumintBydevelopmentyesMemory limit of the container. Not supported on Windows.
container.memory.usage.maxsumintBydevelopmentnoMaximum memory usage.
container.memory.usage.totalsumintBydevelopmentyesMemory usage of the container. This excludes the cache.
container.memory.writebacksumintBydevelopmentnoNumber of bytes of file/anon cache that are queued for syncing to disk in this cgroup (Only available with cgroups v1).
container.network.io.usage.rx_bytessum (monotonic)intBydevelopmentyesinterface (string)Bytes received by the container.
container.network.io.usage.rx_droppedsum (monotonic)int{packets}developmentyesinterface (string)Incoming packets dropped.
container.network.io.usage.rx_errorssum (monotonic)int{errors}developmentnointerface (string)Received errors. Not supported on Windows.
container.network.io.usage.rx_packetssum (monotonic)int{packets}developmentnointerface (string)Packets received.
container.network.io.usage.tx_bytessum (monotonic)intBydevelopmentyesinterface (string)Bytes sent.
container.network.io.usage.tx_droppedsum (monotonic)int{packets}developmentyesinterface (string)Outgoing packets dropped.
container.network.io.usage.tx_errorssum (monotonic)int{errors}developmentnointerface (string)Sent errors. Not supported on Windows.
container.network.io.usage.tx_packetssum (monotonic)int{packets}developmentnointerface (string)Packets sent.
container.pids.countsumint{pids}developmentnoNumber of pids in the container's cgroup. It requires docker API 1.23 or higher and kernel version >= 4.3 with pids cgroup supported. More docs
container.pids.limitsumint{pids}developmentnoMaximum number of pids in the container's cgroup. It requires docker API 1.23 or higher and kernel version >= 4.3 with pids cgroup supported. More docs
container.restartssum (monotonic)int{restarts}developmentnoNumber of restarts for the container.
container.state.health.statussumint{container}developmentnocontainer.state.health.state (string)The number of containers that are currently in a given health state. All possible container health states will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current health state will be non-zero.
container.state.statussumint{status}developmentnocontainer.state.status (string)Number of containers in a given state. State is one of - created, running, paused, restarting, removing, exited and dead
container.uptimegaugedoublesdevelopmentnoTime elapsed since container start time.

Attributes

AttributeTypeDescription
container.state.health.statestringThe health state of the container.
container.state.statusstringContainer State
corestringThe CPU core number when utilising per-CPU metrics.
device_majorstringDevice major number for block IO operations.
device_minorstringDevice minor number for block IO operations.
interfacestringNetwork interface.
operationstringType of BlockIO operation.

Data

  • JSON (latest): /data/collector/components/contrib-dockerstatsreceiver/latest.json
  • JSON (pinned): /data/collector/components/contrib-dockerstatsreceiver/contrib-dockerstatsreceiver-f9c26b6f556e.json
  • Explore: /collector/components/contrib/dockerstatsreceiver