system/info
Get comprehensive information about the Docker host including daemon configuration, container counts, and resource capacity.
When to Use
- Operations dashboard: Populate a host capacity dashboard with live container counts, CPU, and memory figures sourced directly from the Docker daemon.
- Pre-deploy capacity check: Verify that the target host has sufficient free resources (CPU cores, memory) before creating resource-intensive containers.
- Host inventory: Enumerate all Docker hosts with their system profiles (OS, kernel, Docker version, architecture) for asset management.
- Configuration drift detection: Compare
DockerRootDirand daemon configuration fields against the expected baseline to detect unauthorized changes. - Incident debugging: Retrieve full host context (OS, kernel version, storage driver, daemon version) to include in incident reports when diagnosing deployment failures.
Configuration
Connection
| Field | Type | Default | Description |
|---|---|---|---|
dockerHost | string | unix:///var/run/docker.sock | Docker daemon socket path or TCP endpoint. |
connectionType | string | unixsocket | One of: unixsocket, tcp, tcptls. |
tlsCertPath | string | — | TLS certificate directory. Required for tcptls. optional |
timeoutSeconds | int | 30 | Operation timeout. optional |
Operation Fields
This operation requires no additional input fields. Set resource to system and operation to info.
Sample Configuration
{
"resource": "system",
"operation": "info",
"connection": {
"dockerHost": "unix:///var/run/docker.sock",
"connectionType": "unixsocket"
}
}
Validation Errors
| Error Code | Condition | Resolution |
|---|---|---|
CONFIG_ERROR | Connection settings missing or malformed. | Check dockerHost and connectionType. |
AUTH_FAILED | TLS handshake failed. | Verify tlsCertPath certificates. |
DOCKER_API_ERROR | Daemon returned an unexpected error or is unreachable. | Check daemon status on the host. Use system/ping for a lightweight connectivity check first. |
Output
Success Port
| Field | Type | Description |
|---|---|---|
status | string | "ok" on success. |
resource | string | "system" |
operation | string | "info" |
dockerInfo.Containers | int | Total container count (all states). |
dockerInfo.ContainersRunning | int | Number of running containers. |
dockerInfo.ContainersPaused | int | Number of paused containers. |
dockerInfo.ContainersStopped | int | Number of stopped containers. |
dockerInfo.Images | int | Total number of images on the host. |
dockerInfo.MemTotal | int | Total host memory in bytes. |
dockerInfo.NCPU | int | Number of logical CPUs available to the daemon. |
dockerInfo.DockerRootDir | string | Docker data root directory path. |
dockerInfo.ServerVersion | string | Docker daemon version string. |
dockerInfo.OperatingSystem | string | Host operating system name. |
dockerInfo.KernelVersion | string | Host kernel version string. |
Error Port
Fires when the operation fails. Output contains status: "error", errorCode, and errorMessage.
Sample Output
{
"status": "ok",
"resource": "system",
"operation": "info",
"dockerInfo": {
"Containers": 12,
"ContainersRunning": 8,
"ContainersPaused": 0,
"ContainersStopped": 4,
"Images": 23,
"MemTotal": 17179869184,
"NCPU": 8,
"DockerRootDir": "/var/lib/docker",
"ServerVersion": "26.1.3",
"OperatingSystem": "Ubuntu 24.04.1 LTS",
"KernelVersion": "6.8.0-40-generic"
}
}
Expression Reference
| Expression | Returns |
|---|---|
{{ $output.dockerInfo.ContainersRunning }} | Count of running containers — use in dashboard. |
{{ $output.dockerInfo.MemTotal }} | Total host memory in bytes. |
{{ ($output.dockerInfo.MemTotal / 1073741824).toFixed(1) }} | Total memory in GB. |
{{ $output.dockerInfo.NCPU }} | Logical CPU count — use for capacity planning assertions. |
{{ $output.dockerInfo.ServerVersion }} | Docker daemon version — use in compliance audit records. |
Node Policies & GuardRails
| Policy | Enforcement |
|---|---|
| Never expose Docker daemon TCP without TLS | Use tcptls for remote connections. Plain tcp is blocked in production GuardRail profiles. |
| Store TLS certificates in Credentials Manager | Reference tlsCertPath via {{ $credentials.dockerTlsCertPath }}. |
| Use system/ping before system/info in health-check workflows | system/ping is a lightweight connectivity test. Reserve system/info for when full daemon metadata is needed. |
| Never interpolate user input into connection fields | The dockerHost value must come from credentials or fixed configuration. |
| Always handle the error port | A daemon-down scenario will route to the error port — wire it to an alerting or failover node. |
| Restrict container/exec to approved commands | Arbitrary exec access is root-equivalent. GuardRail exec policies restrict allowed command prefixes. |
Examples
Example 1 — Pre-Deploy Capacity Gate
Before deploying a resource-intensive container (e.g., ML inference server requiring 8 GB RAM), check that the host has sufficient total memory and available container headroom.
// After system/info:
// Condition: enough memory?
{{ $output.dockerInfo.MemTotal >= 8589934592 }} // 8 GB in bytes
// Condition: not overloaded?
{{ $output.dockerInfo.ContainersRunning < 50 }}
Example 2 — Host Inventory Report
Call system/info on each Docker host in a scheduled workflow and write results to an asset database.
{
"hostEndpoint": "{{ $loopItem.endpoint }}",
"os": "{{ $output.dockerInfo.OperatingSystem }}",
"kernel": "{{ $output.dockerInfo.KernelVersion }}",
"dockerVersion": "{{ $output.dockerInfo.ServerVersion }}",
"cpus": "{{ $output.dockerInfo.NCPU }}",
"memoryGB": "{{ ($output.dockerInfo.MemTotal / 1073741824).toFixed(1) }}"
}
Example 3 — Configuration Drift Detection
Compare the host's DockerRootDir and ServerVersion against the expected values stored in a configuration baseline. Alert if they differ.
// Drift condition:
{{ $output.dockerInfo.DockerRootDir !== '/var/lib/docker' ||
$output.dockerInfo.ServerVersion !== $vars.expectedDockerVersion }}
// If true → send drift alert to ops channel