summaryrefslogtreecommitdiffstats
path: root/src/collectors/cgroups.plugin/cgroup-name.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/collectors/cgroups.plugin/cgroup-name.sh.in')
-rwxr-xr-xsrc/collectors/cgroups.plugin/cgroup-name.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/collectors/cgroups.plugin/cgroup-name.sh.in b/src/collectors/cgroups.plugin/cgroup-name.sh.in
index 0f8b63256..18755b622 100755
--- a/src/collectors/cgroups.plugin/cgroup-name.sh.in
+++ b/src/collectors/cgroups.plugin/cgroup-name.sh.in
@@ -155,7 +155,7 @@ function docker_like_get_name_api() {
info "Running API command: curl \"${host}${path}\""
JSON=$(curl -sS "${host}${path}")
fi
- if OUTPUT=$(echo "${JSON}" | jq -r '.Config.Env[],"CONT_NAME=\(.Name)","IMAGE_NAME=\(.Config.Image)"') && [ -n "$OUTPUT" ]; then
+ if OUTPUT=$(echo "${JSON}" | jq -r '.Config.Env[]?,"CONT_NAME=\(.Name)","IMAGE_NAME=\(.Config.Image)"') && [ -n "$OUTPUT" ]; then
parse_docker_like_inspect_output "$OUTPUT"
fi
return 0
@@ -610,7 +610,7 @@ function podman_validate_id() {
DOCKER_HOST="${DOCKER_HOST:=/var/run/docker.sock}"
PODMAN_HOST="${PODMAN_HOST:=/run/podman/podman.sock}"
CGROUP_PATH="${1}" # the path as it is (e.g. '/docker/efcf4c409')
-CGROUP="${2}" # the modified path (e.g. 'docker_efcf4c409')
+CGROUP="${2//\//_}" # the modified path (e.g. 'docker_efcf4c409')
EXIT_SUCCESS=0
EXIT_RETRY=2
EXIT_DISABLE=3