Compatibility - antimetal/system-agent GitHub Wiki
This guide outlines the compatibility matrix for cgroup collectors across different environments.
Version | Status | Notes |
---|---|---|
cgroup v2 | ✅ Fully Supported | Preferred, unified hierarchy |
cgroup v1 | ✅ Fully Supported | Legacy, separate hierarchies |
Runtime | cgroup v1 | cgroup v2 | Notes |
---|---|---|---|
Docker | ✅ | ✅ | 20.10+ recommended for v2 |
containerd | ✅ | ✅ | 1.4+ for full v2 support |
CRI-O | ✅ | ✅ | Native v2 support |
Podman | ✅ | ✅ | Rootless mode supported |
The collectors support the two primary cgroup drivers that cover 90%+ of production deployments:
Driver | Description | Use Cases |
---|---|---|
cgroupfs | Direct filesystem driver | Docker/containerd without systemd integration |
systemd | Systemd-managed cgroups | Modern Linux distributions with systemd |
This pragmatic approach covers virtually all real-world container deployments without the complexity of supporting exotic configurations.
Version | Support | Notes |
---|---|---|
1.25+ | ✅ Full | cgroup v2 GA |
1.21-1.24 | ✅ Full | cgroup v2 beta |
1.19-1.20 | ✅ v1 only | Limited v2 support |
Platform | Support | Notes |
---|---|---|
Linux | ✅ Full Support | Primary target platform for production containers |
Windows | ❌ Not Supported | Would require container runtime APIs |
macOS | ❌ Not Supported | Not a production container platform |
The cgroup-based approach is inherently Linux-specific as cgroups are a Linux kernel feature. This aligns with production reality where container workloads run on Linux servers. Future Windows support would require a different implementation using container runtime APIs.
Feature | Minimum Kernel | Recommended |
---|---|---|
cgroup v1 | 2.6.24+ | 4.4+ |
cgroup v2 | 4.5+ | 5.8+ |
PSI metrics | 4.20+ | 5.8+ |
The collectors automatically detect the cgroup version by:
- Checking for
/sys/fs/cgroup/cgroup.controllers
(v2 indicator) - Examining the mount type of
/sys/fs/cgroup
- Falling back to v1 if v2 detection fails
- Cgroup paths may change across container runtime versions
- Container IDs in paths are typically the actual container ID, but could theoretically be internal mappings
- We rely on "mostly stable" path patterns that have proven consistent in practice
- We assume the standard
/sys/fs/cgroup
mount location - For non-standard mount points, the
HOST_SYS
environment variable can be adjusted - Future enhancement: Parse
/etc/mtab
for dynamic mount discovery
- Ensure the agent has read access to
/sys/fs/cgroup
- Some metrics may require CAP_SYS_ADMIN capability
- PSI (Pressure Stall Information) requires kernel 4.20+
- Some v2 controllers may be disabled by default
Different distributions may mount cgroups at:
-
/sys/fs/cgroup
(standard) -
/cgroup
(older systems) - Custom locations (check
/proc/mounts
)