Cgroup - antimetal/system-agent GitHub Wiki
Cgroup Collectors Documentation
The Antimetal Agent provides container-level resource monitoring through cgroup collectors on Linux systems.
📚 Documentation
Getting Started
- Overview - Introduction to cgroup collectors and key features
- Compatibility Guide - Platform support and version compatibility
Collector Documentation
- CPU Collector - Monitor container CPU usage and throttling
- Memory Collector - Track container memory consumption and pressure
Development
- Testing Guide - How to test and validate cgroup collectors
🚀 Quick Start
The cgroup collectors automatically discover and monitor containers without requiring runtime API access:
- Automatic Detection - Identifies cgroup v1 or v2
- Container Discovery - Finds all running containers
- Metrics Collection - Gathers CPU and memory statistics
- Runtime Support - Works with Docker, containerd, CRI-O, and Podman
🎯 Key Features
- Zero Configuration - Works out of the box
- Multi-Runtime Support - All major container runtimes
- Graceful Degradation - Handles missing files and permissions
- Production Focus - Optimized for Linux production environments
📋 Requirements
- Platform: Linux only (cgroups are a Linux kernel feature)
- Kernel: 2.6.24+ for cgroup v1, 4.5+ for cgroup v2
- Access: Read permissions to
/sys/fs/cgroup
🔍 Design Philosophy
The collectors use a filesystem-based approach rather than container runtime APIs:
- Simplicity - Direct filesystem reads are reliable and fast
- Independence - No dependency on runtime API availability
- Compatibility - Works across different runtime versions
- Performance - Minimal overhead, no API round-trips
⚠️ Known Limitations
- Linux Only - Windows would require runtime APIs
- Path Stability - Cgroup paths may change across runtime versions
- Mount Assumptions - Assumes standard
/sys/fs/cgroup
location
For detailed information, explore the documentation links above.