Skip to main content

Description

The container_mon probe monitors Docker and Docker Swarm containers via the Docker Engine API (HTTP over unix socket). Tracks running state, restart count, and optional CPU/memory stats. Build tag vms_heavy.

Config fields

FieldTypeRequiredDefaultDescription
typestringYesMust be "container_mon"
runtimestringYes"docker" or "docker_swarm"
runtimeEndpointstringNo/var/run/docker.sockDocker socket path
containerNamePatternstringNoRegex to match container names. Empty = all
serviceNamestringNoDocker Swarm service name
collectStatsboolNofalseCollect CPU% and memory for running containers

Metrics

MetricTypeUnitLabelsDescription
vms.container_mon.statusstatuscontainerPer-container state
vms.container_mon.restart_countcountercontainerRestart count
vms.container_mon.cpu_percentgaugepercentcontainerCPU usage
vms.container_mon.memory_bytesgaugebytescontainerMemory usage
vms.container_mon.memory_percentgaugepercentcontainerMemory usage %

Example config

{
  "type": "container_mon",
  "runtime": "docker",
  "containerNamePattern": "core-.*",
  "collectStats": true
}

Notes

  • Max 50 containers matched per run.
  • Docker socket unreachable → status unknown, emits vms.agent.permission_missing{capability=docker.sock}.
  • Build tag vms_heavy — not in default agent package.