chore(cgroup.plugin): remove undocumented feature reading cgroups-names.sh when renaming cgroups (#12745)
Co-authored-by: Vladimir Kobal <vlad@prokk.net>
Ilya Mashchenko committed
Apr 27, 2022 at 08:23 UTC
005d060bebf855ea0e22a09896d85976477b1826
3 files changed
-25
.gitignore
-1
@@ -134,7 +134,6 @@ daemon/get-kubernetes-labels.sh
134
135
health/notifications/alarm-notify.sh
136
claim/netdata-claim.sh
137
-collectors/cgroups.plugin/cgroup-name.sh
137
collectors/tc.plugin/tc-qos-helper.sh
138
collectors/charts.d.plugin/charts.d.plugin
139
collectors/node.d.plugin/node.d.plugin
collectors/cgroups.plugin/Makefile.am
-8
@@ -3,19 +3,11 @@
3
AUTOMAKE_OPTIONS = subdir-objects
4
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
5
6
-CLEANFILES = \
7
- cgroup-name.sh \
8
- $(NULL)
9
-
10
-include $(top_srcdir)/build/subst.inc
11
-SUFFIXES = .in
12
-
6
dist_plugins_SCRIPTS = \
7
cgroup-name.sh \
8
cgroup-network-helper.sh \
9
$(NULL)
10
11
dist_noinst_DATA = \
19
- cgroup-name.sh.in \
12
README.md \
13
$(NULL)
collectors/cgroups.plugin/cgroup-name.sh
renamed
-16
@@ -396,9 +396,6 @@ function podman_validate_id() {
396
397
# -----------------------------------------------------------------------------
398
399
-[ -z "${NETDATA_USER_CONFIG_DIR}" ] && NETDATA_USER_CONFIG_DIR="@configdir_POST@"
400
-[ -z "${NETDATA_STOCK_CONFIG_DIR}" ] && NETDATA_STOCK_CONFIG_DIR="@libconfigdir_POST@"
401
-
399
DOCKER_HOST="${DOCKER_HOST:=/var/run/docker.sock}"
400
PODMAN_HOST="${PODMAN_HOST:=/run/podman/podman.sock}"
401
CGROUP="${1}"
@@ -411,19 +408,6 @@ if [ -z "${CGROUP}" ]; then
408
fatal "called without a cgroup name. Nothing to do."
409
fi
410
414
-for CONFIG in "${NETDATA_USER_CONFIG_DIR}/cgroups-names.conf" "${NETDATA_STOCK_CONFIG_DIR}/cgroups-names.conf"; do
415
- if [ -f "${CONFIG}" ]; then
416
- NAME="$(grep "^${CGROUP} " "${CONFIG}" | sed 's/[[:space:]]\+/ /g' | cut -d ' ' -f 2)"
417
- if [ -z "${NAME}" ]; then
418
- info "cannot find cgroup '${CGROUP}' in '${CONFIG}'."
419
- else
420
- break
421
- fi
422
- #else
423
- # info "configuration file '${CONFIG}' is not available."
424
- fi
425
-done
426
-
411
if [ -z "${NAME}" ]; then
412
if [[ ${CGROUP} =~ ^.*kubepods.* ]]; then
413
k8s_get_name "${CGROUP}"