fixed cgroups docu (#7889)

This commit is contained in:
A. Binzxxxxxx 2020-07-24 18:42:17 +02:00 committed by GitHub
parent af1e8ac63c
commit 72fdfd8bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 11 deletions

View File

@ -43,20 +43,30 @@ All measurements have the following tags:
### Configuration:
```
```toml
# [[inputs.cgroup]]
# paths = [
# "/cgroup/memory", # root cgroup
# "/cgroup/memory/child1", # container cgroup
# "/cgroup/memory/child2/*", # all children cgroups under child2, but not child2 itself
# "/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:
```toml
# [[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 = [
# "/cgroup/cpu", # root cgroup
# "/cgroup/cpu/*", # all container cgroups
# "/cgroup/cpu/*/*", # all children cgroups under each container cgroup
# "/sys/fs/cgroup/unified/*", # root cgroup
# ]
# files = ["cpuacct.usage", "cpu.cfs_period_us", "cpu.cfs_quota_us"]
# files = ["*"]
```

View File

@ -16,9 +16,9 @@ var sampleConfig = `
## want to monitor if you have a large number of cgroups, to avoid
## any cardinality issues.
# paths = [
# "/cgroup/memory",
# "/cgroup/memory/child1",
# "/cgroup/memory/child2/*",
# "/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.