projects
/
invirt/packages/xvm-munin-config.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
997c89a
)
Tweak xen_net per comments from achernya
author
Quentin Smith
<quentin@mit.edu>
Mon, 6 Jan 2014 07:12:40 +0000
(
02:12
-0500)
committer
Quentin Smith
<quentin@mit.edu>
Mon, 6 Jan 2014 07:12:40 +0000
(
02:12
-0500)
host/usr/share/xvm-munin-host-config/plugins/xen_net
patch
|
blob
|
history
diff --git
a/host/usr/share/xvm-munin-host-config/plugins/xen_net
b/host/usr/share/xvm-munin-host-config/plugins/xen_net
index
822b3e0
..
96e2929
100755
(executable)
--- a/
host/usr/share/xvm-munin-host-config/plugins/xen_net
+++ b/
host/usr/share/xvm-munin-host-config/plugins/xen_net
@@
-25,8
+25,9
@@
def live_vms():
def get_dom(domid):
data = dict(domid=domid)
data['name'] = xsc.read('', '/local/domain/%d/name' % domid)
def get_dom(domid):
data = dict(domid=domid)
data['name'] = xsc.read('', '/local/domain/%d/name' % domid)
+ # /vm contains a path like "/vm/UUID"; strip the "/vm/"
data['uuid'] = xsc.read('', '/local/domain/%d/vm' % domid)[4:]
data['uuid'] = xsc.read('', '/local/domain/%d/vm' % domid)[4:]
- if data['name'][0:2] == 'd_':
+ if data['name'].startswith('d_'):
data['munin_name'] = 'db domid %d' % domid
else:
data['munin_name'] = data['name']
data['munin_name'] = 'db domid %d' % domid
else:
data['munin_name'] = data['name']
@@
-77,12
+78,12
@@
if __name__ == '__main__':
if cmd == 'config':
print """
if cmd == 'config':
print """
- graph_title Xen domain network usage
- graph_args --base 1000
- graph_vlabel bits in (-) / out (+) per ${graph_period}
- graph_info This graph shows how network is utilized by Xen domains.
- graph_category network
- graph_period second"""
+ graph_title Xen domain network usage
+ graph_args --base 1000
+ graph_vlabel bits in (-) / out (+) per ${graph_period}
+ graph_info This graph shows how network is utilized by Xen domains.
+ graph_category network
+ graph_period second"""
for d in sorted(domains):
for direction in ('down', 'up'):
key = "%s_%s" % (d, direction)
for d in sorted(domains):
for direction in ('down', 'up'):
key = "%s_%s" % (d, direction)