diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:00 +0000 |
commit | 03bf87dcb06f7021bfb2df2fa8691593c6148aff (patch) | |
tree | e16b06711a2ed77cafb4b7754be0220c3d14a9d7 /collectors/cgroups.plugin/cgroup-name.sh | |
parent | Adding upstream version 1.36.1. (diff) | |
download | netdata-upstream/1.37.0.tar.xz netdata-upstream/1.37.0.zip |
Adding upstream version 1.37.0.upstream/1.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | collectors/cgroups.plugin/cgroup-name.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/collectors/cgroups.plugin/cgroup-name.sh b/collectors/cgroups.plugin/cgroup-name.sh index d1277b745..55b02ac72 100755 --- a/collectors/cgroups.plugin/cgroup-name.sh +++ b/collectors/cgroups.plugin/cgroup-name.sh @@ -450,7 +450,10 @@ function k8s_get_name() { function docker_get_name() { local id="${1}" - if hash docker 2> /dev/null; then + # See https://github.com/netdata/netdata/pull/13523 for details + if command -v snap >/dev/null 2>&1 && snap list docker >/dev/null 2>&1; then + docker_like_get_name_api DOCKER_HOST "${id}" + elif hash docker 2> /dev/null; then docker_like_get_name_command docker "${id}" else docker_like_get_name_api DOCKER_HOST "${id}" || docker_like_get_name_command podman "${id}" |