Changeset 1774


Ignore:
Timestamp:
Nov 25, 2008, 7:09:50 PM (15 years ago)
Author:
broder
Message:

Fix xen_cpu monitoring script to not use hyphens in UUID

Location:
trunk/packages/xvm-munin-config
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/xvm-munin-config/debian/changelog

    r1767 r1774  
     1xvm-munin-config (0.0.3) unstable; urgency=low
     2
     3  * Fix xen_cpu script to leave out hyphens from UUID
     4
     5 -- Evan Broder <broder@mit.edu>  Tue, 25 Nov 2008 19:07:44 -0500
     6
    17xvm-munin-config (0.0.2) unstable; urgency=low
    28
  • trunk/packages/xvm-munin-config/host/usr/share/xvm-munin-host-config/plugins/xen_cpu

    r1765 r1774  
    3434        metrics = server.xenapi.VM_metrics.get_all_records()
    3535        for d in domains.values():
    36             ret[d['uuid']] = {'name': d['name_label'],
    37                               'cpu_time': sum(metrics[d['metrics']]['VCPUs_utilisation'].values()),
    38                               'domid': d['domid'],
    39                               }
     36            ret[d['uuid'].replace('-', '_')] = {'name': d['name_label'],
     37                                                'cpu_time': sum(metrics[d['metrics']]['VCPUs_utilisation'].values()),
     38                                                'domid': d['domid'],
     39                                                }
    4040        return ret
    4141    else:
    4242        domains = server.xend.domains_with_state(True, 'all', True)
    4343        for d in domains:
    44             ret[sxp.child_value(d, 'uuid', 'NONE')] = {'name': sxp.child_value(d, 'name', 'UNKNOWN'),
    45                                                        'cpu_time': sxp.child_value(d, 'cpu_time', 0.0),
    46                                                        'domid': sxp.child_value(d, 'domid', -1),
    47                                                        }
     44            ret[sxp.child_value(d, 'uuid', 'NONE').replace('-', '_')] = {'name': sxp.child_value(d, 'name', 'UNKNOWN'),
     45                                                                         'cpu_time': sxp.child_value(d, 'cpu_time', 0.0),
     46                                                                         'domid': sxp.child_value(d, 'domid', -1),
     47                                                                         }
    4848        return ret
    4949
Note: See TracChangeset for help on using the changeset viewer.