Browse Source

fix(cgroup.plugin): handle qemu-1- prefix when extracting virsh domain (#13866)

Ilya Mashchenko 2 years ago
parent
commit
9798a2b71e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      collectors/cgroups.plugin/cgroup-network-helper.sh

+ 1 - 0
collectors/cgroups.plugin/cgroup-network-helper.sh

@@ -150,6 +150,7 @@ virsh_cgroup_to_domain_name() {
 
     # extract for the cgroup path
     sed -n -e "s|.*/machine-qemu\\\\x2d[0-9]\+\\\\x2d\(.*\)\.scope$|\1|p" \
+           -e "s|.*/machine/qemu-[0-9]\+-\(.*\)\.libvirt-qemu$|\1|p" \
            -e "s|.*/machine/\(.*\)\.libvirt-qemu$|\1|p" \
            <<EOF
 ${c}