telegraf/plugins/inputs/cgroup
Sebastian Spaink 8e2b4988fe
feat: migrate input plugins to new sample config format (A-L) (#10924)
2022-04-07 16:01:21 -06:00
..
testdata add cgroup plugin 2016-06-23 10:13:31 +01:00
README.md feat: migrate input plugins to new sample config format (A-L) (#10924) 2022-04-07 16:01:21 -06:00
cgroup.go feat: migrate input plugins to new sample config format (A-L) (#10924) 2022-04-07 16:01:21 -06:00
cgroup_linux.go refactor: move from io/ioutil to io and os package (#9811) 2021-09-28 15:16:32 -06:00
cgroup_notlinux.go fix: support 1.17 & 1.16.7 Go versions (#9642) 2021-08-23 15:37:44 -05:00
cgroup_sample_config.go feat: migrate input plugins to new sample config format (A-L) (#10924) 2022-04-07 16:01:21 -06:00
cgroup_test.go fix: support 1.17 & 1.16.7 Go versions (#9642) 2021-08-23 15:37:44 -05:00

README.md

CGroup Input Plugin

This input plugin will capture specific statistics per cgroup.

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.

Following file formats are supported:

  • Single value
VAL\n
  • New line separated values
VAL0\n
VAL1\n
  • Space separated values
VAL0 VAL1 ...\n
  • Space separated keys and value, separated by new line
KEY0 ... VAL0\n
KEY1 ... VAL1\n

Tags

All measurements have the path tag.

Configuration

# Read specific statistics per cgroup
[[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"]

Example

# [[inputs.cgroup]]
  # paths = [
  #   "/sys/fs/cgroup/cpu",              # root cgroup
  #   "/sys/fs/cgroup/cpu/*",            # all container cgroups
  #   "/sys/fs/cgroup/cpu/*/*",          # all children cgroups under each container cgroup
  # ]
  # files = ["cpuacct.usage", "cpu.cfs_period_us", "cpu.cfs_quota_us"]

# [[inputs.cgroup]]
  # paths = [
  #   "/sys/fs/cgroup/unified/*",        # root cgroup
  # ]
  # files = ["*"]