Add systemd pattern list parameter to the documentation (#5077)
* Add systemd pattern list parameter to the documentation * Remove newline in code fragment
Vladimir Kobal committed
Dec 30, 2018 at 17:37 UTC
9b96eee1601ee3ef1bcf8fd5d5ad2c572b026fc9
1 file changed
+10
-3
collectors/cgroups.plugin/README.md
+10
-3
@@ -32,7 +32,7 @@ Linux exposes resource usage reporting and provides dynamic configuration for cg
32
path to /sys/fs/cgroup/blkio = /sys/fs/cgroup/blkio
33
path to /sys/fs/cgroup/memory = /sys/fs/cgroup/memory
34
path to /sys/fs/cgroup/devices = /sys/fs/cgroup/devices
35
-```
35
+```
36
37
netdata rescans these directories for added or removed cgroups every `check for new cgroups every` seconds.
38
@@ -51,7 +51,7 @@ To provide a sane default for this setting, netdata uses the following pattern l
51
52
```
53
[plugin:cgroups]
54
- search for cgroups in subpaths matching = !*/init.scope !*-qemu !/init.scope !/system !/systemd !/user !/user.slice *
54
+ search for cgroups in subpaths matching = !*/init.scope !*-qemu !/init.scope !/system !/systemd !/user !/user.slice *
55
```
56
57
So, we disable checking for **child cgroups** in systemd internal cgroups ([systemd services are monitored by netdata](#monitoring-systemd-services)), user cgroups (normally used for desktop and remote user sessions), qemu virtual machines (child cgroups of virtual machines) and `init.scope`. All others are enabled.
@@ -70,7 +70,7 @@ To provide a sane default, netdata uses the following pattern list (it checks th
70
71
```
72
[plugin:cgroups]
73
- enable by default cgroups matching = !*/init.scope *.scope !*/vcpu* !*/emulator !*.mount !*.partition !*.service !*.slice !*.swap !*.user !/ !/docker !/libvirt !/lxc !/lxc/*/ns !/lxc/*/ns/* !/machine !/qemu !/system !/systemd !/user *
73
+ enable by default cgroups matching = !*/init.scope *.scope !*/vcpu* !*/emulator !*.mount !*.partition !*.service !*.slice !*.swap !*.user !/ !/docker !/libvirt !/lxc !/lxc/*/ns !/lxc/*/ns/* !/machine !/qemu !/system !/systemd !/user *
74
```
75
76
The above provides the default `yes` or `no` setting for the cgroup. However, there is an additional step. In many cases the cgroups found in the `/sys/fs/cgroup` hierarchy are just random numbers and in many cases these numbers are ephemeral: they change across reboots or sessions.
@@ -158,6 +158,13 @@ cgroup_enable=memory swapaccount=1
158
159
You can add the above, directly at the `linux` line in your `/boot/grub/grub.cfg` or appending them to the `GRUB_CMDLINE_LINUX` in `/etc/default/grub` (in which case you will have to run `update-grub` before rebooting). On DigitalOcean debian images you may have to set it at `/etc/default/grub.d/50-cloudimg-settings.cfg`.
160
161
+Which systemd services are monitored by netdata is determined by the following pattern list:
162
+
163
+```
164
+[plugin:cgroups]
165
+ cgroups to match as systemd services = !/system.slice/*/*.service /system.slice/*.service
166
+```
167
+
168
---
169
170
## Monitoring ephemeral containers