cgroup

package
v1.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 9 Imported by: 17 modules, 15 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

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
  • New line separated key-space-value's
KEY0 VAL0\n
KEY1 VAL1\n
Tags:

All measurements have the following tags:

  • path
Configuration:
# [[inputs.cgroup]]
  # paths = [
  #   "/sys/fs/cgroup/memory",           # root cgroup
  #   "/sys/fs/cgroup/memory/child1",    # container cgroup
  #   "/sys/fs/cgroup/memory/child2/*",  # all children cgroups under child2, but not child2 itself
  # ]
  # files = ["memory.*usage*", "memory.limit_in_bytes"]
usage examples:
# [[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 = ["*"]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CGroup

type CGroup struct {
	Paths []string `toml:"paths"`
	Files []string `toml:"files"`
}

func (*CGroup) Description

func (g *CGroup) Description() string

func (*CGroup) Gather

func (g *CGroup) Gather(acc telegraf.Accumulator) error

func (*CGroup) SampleConfig

func (g *CGroup) SampleConfig() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL