fleet/schema/tables/containerd_containers.yml
Zach Wasserman 4a977cfff3
Add containerd_containers table to fleetd (#29384)
# Checklist for submitter

Implementation for #28315 

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added/updated automated tests (automated testing seemed
infeasible)
- [x] Manual QA for all new/changed functionality (tested on Ubuntu 24)
- For Orbit and Fleet Desktop changes:
- [x] Make sure fleetd is compatible with the latest released version of
Fleet (see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)).
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [x] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux. (tested on Ubuntu 24, code does not compile on other
platforms)
2025-05-27 10:55:38 -07:00

73 lines
1.9 KiB
YAML

name: containerd_containers
platforms:
- linux
description: Information about containerd containers.
evented: false
columns:
- name: namespace
type: text
required: false
description: |-
Namespace of the container.
- name: id
type: text
required: false
description: |-
Container ID.
- name: image
type: text
required: false
description: |-
Image name.
- name: image_digest
type: text
required: false
description: |-
Image digest (SHA256).
- name: state
type: text
required: false
description: |-
Container state (e.g. running, stopped).
- name: created
type: integer
required: false
description: |-
Unix timestamp of when the container was created.
- name: runtime
type: text
required: false
description: |-
Name of the container runtime (e.g. io.containerd.runc.v2).
- name: command
type: text
required: false
description: |-
Command used to start the container.
- name: pid
type: integer
required: false
description: |-
PID of the container process.
examples: |-
Get all containers from all namespaces:
```
SELECT * FROM containerd_containers;
```
Get only running containers in the `default` namespace:
```
SELECT * FROM containerd_containers WHERE namespace='default' AND state='running';
```
notes: |-
This table is not a core osquery table. It is included as part of Fleet's agent
([fleetd](https://fleetdm.com/docs/get-started/anatomy#fleetd)).
The `containerd` table is available on Linux systems with containerd installed. It provides
information about the containers managed by containerd, including their state, image, and runtime.
This table is useful for systems using containerd as a container runtime, such as those running
Kubernetes. See the `docker_containers` table for information about containers managed by Docker.