diff options
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}" |