---
title: ''
description: Telegraf plugin for collecting metrics from Control Group
url: https://docs.influxdata.com/telegraf/v1/input-plugins/cgroup/
estimated_tokens: 501
product: Telegraf Controller
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/input-plugins/cgroup/
date: '2026-05-21T20:10:18+02:00'
lastmod: '2026-05-21T20:10:18+02:00'
---

==========

* Telegraf v1.0.0+

[Plugin source](https://github.com/influxdata/telegraf/tree/v1.39.0/plugins/inputs/cgroup/)[Download configuration](https://raw.githubusercontent.com/influxdata/telegraf/refs/tags/v1.39.0/plugins/inputs/cgroup/sample.conf)

# Control Group Input Plugin

This plugin gathers statistics per [control group (cgroup)](https://docs.kernel.org/admin-guide/cgroup-v2.html).

> [!Note]
> Consider restricting paths to the set of cgroups you are interested in if you
> have a large number of cgroups, to avoid cardinality issues.

The plugin supports the *single value format* in the form

```text
VAL\n
```

the *new line separated values format* in the form

```text
VAL0\n
VAL1\n
```

the *space separated values format* in the form

```text
VAL0 VAL1 ...\n
```

and the *space separated keys and value, separated by new line format* in the
form

```text
KEY0 ... VAL0\n
KEY1 ... VAL1\n
```

**Introduced in:** Telegraf v1.0.0**Tags:** system**OS support:** linux

## Global configuration options

Plugins support additional global and plugin configuration settings for tasks
such as modifying metrics, tags, and fields, creating aliases, and configuring
plugin ordering. See [CONFIGURATION.md](/telegraf/v1/configuration/#plugins) for more details.

## Configuration

```toml
# Read specific statistics per cgroup
# This plugin ONLY supports Linux
[[inputs.cgroup]]
  ## Directories in which to look for files, globs are supported.
  ## Consider restricting paths to the set of cgroups you really
  ## want to monitor if you have a large number of cgroups, to avoid
  ## any cardinality issues.
  # paths = [
  #   "/sys/fs/cgroup/memory",
  #   "/sys/fs/cgroup/memory/child1",
  #   "/sys/fs/cgroup/memory/child2/*",
  # ]
  ## cgroup stat fields, as file names, globs are supported.
  ## these file names are appended to each path from above.
  # files = ["memory.*usage*", "memory.limit_in_bytes"]
```

## Metrics

All measurements have the `path` tag.

## Example Output
