src/collectors/cgroups.plugin/integrations/libvirt_vms_and_containers.md
Plugin: cgroups.plugin Module: /sys/fs/cgroup
Monitor libvirt-managed VM and container resource utilization — CPU, memory, disk I/O, and network — via Linux cgroups.
This collector is only supported on the following platforms:
This collector supports collecting metrics from multiple instances of this integration, including remote instances.
This integration doesn't support auto-detection.
The default configuration for this integration does not impose any limits on data collection.
The default configuration for this integration is not expected to impose a significant performance impact on the system.
No action required.
There are no configuration options.
There is no configuration file.
There are no configuration examples.
The following alerts are available:
| Alert name | On metric | Description |
|---|---|---|
| cgroup_10min_cpu_usage | cgroup.cpu_limit | average cgroup CPU utilization over the last 10 minutes |
| cgroup_ram_in_use | cgroup.mem_usage | cgroup memory utilization |
| cgroup_1m_received_packets_rate | cgroup.net_packets | average number of packets received by the network interface ${label:device} over the last minute |
| cgroup_10s_received_packets_storm | cgroup.net_packets | ratio of average number of received packets for the network interface ${label:device} over the last 10 seconds, compared to the rate over the last minute |
Metrics grouped by scope.
The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
Labels:
| Label | Description |
|---|---|
| container_name | The container name or group path if name resolution fails. |
| image | Docker/Podman container image name. |
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| cgroup.cpu_limit | CPU Usage within the limits | used | percentage |
| cgroup.cpu | CPU Usage (100% = 1 core) | user, system | percentage |
| cgroup.cpu_per_core | CPU Usage (100% = 1 core) Per Core | a dimension per core | percentage |
| cgroup.throttled | CPU Throttled Runnable Periods | throttled | percentage |
| cgroup.throttled_duration | CPU Throttled Time Duration | duration | ms |
| cgroup.cpu_shares | CPU Time Relative Share | shares | shares |
| cgroup.mem | Memory Usage | cache, rss, swap, rss_huge, mapped_file | MiB |
| cgroup.writeback | Writeback Memory | dirty, writeback | MiB |
| cgroup.mem_activity | Memory Activity | in, out | MiB/s |
| cgroup.pgfaults | Memory Page Faults | pgfault, swap | MiB/s |
| cgroup.mem_usage | Used Memory | ram, swap | MiB |
| cgroup.mem_usage_limit | Used RAM within the limits | available, used | MiB |
| cgroup.mem_utilization | Memory Utilization | utilization | percentage |
| cgroup.mem_failcnt | Memory Limit Failures | failures | count |
| cgroup.io | I/O Bandwidth (all disks) | read, write | KiB/s |
| cgroup.serviced_ops | Serviced I/O Operations (all disks) | read, write | operations/s |
| cgroup.throttle_io | Throttle I/O Bandwidth (all disks) | read, write | KiB/s |
| cgroup.throttle_serviced_ops | Throttle Serviced I/O Operations (all disks) | read, write | operations/s |
| cgroup.queued_ops | Queued I/O Operations (all disks) | read, write | operations |
| cgroup.merged_ops | Merged I/O Operations (all disks) | read, write | operations/s |
| cgroup.cpu_some_pressure | CPU some pressure | some10, some60, some300 | percentage |
| cgroup.cpu_some_pressure_stall_time | CPU some pressure stall time | time | ms |
| cgroup.cpu_full_pressure | CPU full pressure | some10, some60, some300 | percentage |
| cgroup.cpu_full_pressure_stall_time | CPU full pressure stall time | time | ms |
| cgroup.memory_some_pressure | Memory some pressure | some10, some60, some300 | percentage |
| cgroup.memory_some_pressure_stall_time | Memory some pressure stall time | time | ms |
| cgroup.memory_full_pressure | Memory full pressure | some10, some60, some300 | percentage |
| cgroup.memory_full_pressure_stall_time | Memory full pressure stall time | time | ms |
| cgroup.io_some_pressure | I/O some pressure | some10, some60, some300 | percentage |
| cgroup.io_some_pressure_stall_time | I/O some pressure stall time | time | ms |
| cgroup.io_full_pressure | I/O some pressure | some10, some60, some300 | percentage |
| cgroup.io_full_pressure_stall_time | I/O some pressure stall time | time | ms |
| cgroup.pids_current | Number of processes | pids | pids |
| cgroup.cachestat_ratio | Hit ratio | ratio | % |
| cgroup.cachestat_dirties | Number of dirty pages | dirty | page/s |
| cgroup.cachestat_hits | Number of accessed files | hit | hits/s |
| cgroup.cachestat_misses | Files out of page cache | miss | misses/s |
| cgroup.net_conn_ipv4 | TCP v4 outbound connections | connections | connections/s |
| cgroup.net_conn_ipv6 | TCP v6 outbound connections | connections | connections/s |
| cgroup.net_total_bandwidth | Bandwidth | received, sent | kilobits/s |
| cgroup.net_tcp_recv | TCP calls to clean up buffer | calls | calls/s |
| cgroup.net_tcp_send | TCP calls to send | calls | calls/s |
| cgroup.net_retransmit | TCP retransmits | calls | calls/s |
| cgroup.net_udp_send | UDP calls to send | calls | calls/s |
| cgroup.net_udp_recv | UDP calls to receive | calls | calls/s |
Labels:
| Label | Description |
|---|---|
| container_name | The container name or group path if name resolution fails. |
| image | Docker/Podman container image name. |
| device | The name of the host network interface linked to the container's network interface. |
| container_device | Container network interface name. |
| interface_type | Network interface type. Always "virtual" for the containers. |
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| cgroup.net_net | Bandwidth | received, sent | kilobits/s |
| cgroup.net_packets | Packets | received, sent, multicast | pps |
| cgroup.net_errors | Interface Errors | inbound, outbound | errors/s |
| cgroup.net_drops | Interface Drops | inbound, outbound | errors/s |
| cgroup.net_fifo | Interface FIFO Buffer Errors | receive, transmit | errors/s |
| cgroup.net_compressed | Interface FIFO Buffer Errors | receive, sent | pps |
| cgroup.net_events | Network Interface Events | frames, collisions, carrier | events/s |
| cgroup.net_operstate | Interface Operational State | up, down, notpresent, lowerlayerdown, testing, dormant, unknown | state |
| cgroup.net_carrier | Interface Physical Link State | up, down | state |
| cgroup.net_mtu | Interface MTU | mtu | octets |