Projet

Général

Profil

Révision 28c44877

ID28c4487772240ac028d2af87f9e426b9d795d045
Parent d4056203
Enfant d33fcd55

Ajouté par Henrik Welk il y a plus de 11 ans

Fixing Regexp for kvm plugins to be aware of underscores in vm names (otherwise munin will not generate graphs bc. of too long filenames)

Voir les différences:

plugins/virtualization/kvm_net
84 84
    result = {}
85 85
    for pid in pids:
86 86
        cmdline = open("/proc/%s/cmdline" % pid, "r")
87
        result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-]*)\x00\-.*$",r"\1", cmdline.readline()))        
87
        result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-_]*)\x00\-.*$",r"\1", cmdline.readline()))        
88 88
    return result
89 89
    
90 90
def get_vm_mac(pid):

Formats disponibles : Unified diff