@cryptotaxi247 / netdata-1 / commits / 4b6bcb2f0

chore(cgroups.plugin): remove "enable new cgroups detected at run time" config option (#12906)

Ilya Mashchenko committed May 16, 2022 at 14:21 UTC 4b6bcb2f0eb06b6e2618c7ec401e8fe5b6a4f06a
2 files changed -8
build_external/scenarios/aclk-testing/agent_netdata.conf
-1
@@ -201,7 +201,6 @@
201 # path to /sys/fs/cgroup/devices = /sys/fs/cgroup/devices
202 # max cgroups to allow = 1000
203 # max cgroups depth to monitor = 0
204 - # enable new cgroups detected at run time = yes
204 # enable by default cgroups matching = !*/init.scope !/system.slice/run-*.scope *.scope /machine.slice/*.service !*/vcpu* !*/emulator !*.mount !*.partition !*.service !*.socket !*.slice !*.swap !*.user !/ !/docker !/libvirt !/lxc !/lxc/*/* !/lxc.monitor !/lxc.pivot !/lxc.payload !/machine !/qemu !/system !/systemd !/user *
205 # search for cgroups in subpaths matching = !*/init.scope !*-qemu !*.libvirt-qemu !/init.scope !/system !/systemd !/user !/user.slice !/lxc/*/* !/lxc.monitor !/lxc.payload/*/* *
206 # script to get cgroup names = /usr/libexec/netdata/plugins.d/cgroup-name.sh
collectors/cgroups.plugin/sys_fs_cgroup.c
-7
@@ -64,8 +64,6 @@ static int cgroup_unified_exist = CONFIG_BOOLEAN_AUTO;
64
65 static int cgroup_search_in_devices = 1;
66
67 -static int cgroup_enable_new_cgroups_detected_at_runtime = 1;
68 -
67 static int cgroup_check_for_new_every = 10;
68 static int cgroup_update_every = 1;
69 static int cgroup_containers_chart_priority = NETDATA_CHART_PRIO_CGROUPS_CONTAINERS;
@@ -437,8 +435,6 @@ void read_cgroup_plugin_configuration() {
435 cgroup_root_max = (int)config_get_number("plugin:cgroups", "max cgroups to allow", cgroup_root_max);
436 cgroup_max_depth = (int)config_get_number("plugin:cgroups", "max cgroups depth to monitor", cgroup_max_depth);
437
440 - cgroup_enable_new_cgroups_detected_at_runtime = config_get_boolean("plugin:cgroups", "enable new cgroups detected at run time", cgroup_enable_new_cgroups_detected_at_runtime);
441 -
438 enabled_cgroup_paths = simple_pattern_create(
439 config_get("plugin:cgroups", "enable by default cgroups matching",
440 // ----------------------------------------------------------------
@@ -898,9 +894,6 @@ struct discovery_thread {
894 // ---------------------------------------------------------------------------------------------
895
896 static inline int matches_enabled_cgroup_paths(char *id) {
901 - if (!cgroup_enable_new_cgroups_detected_at_runtime) {
902 - return 0;
903 - }
897 return simple_pattern_matches(enabled_cgroup_paths, id);
898 }
899