commit | 4b85ff115a9c846a01ecb149af72a4629cbabab8 | [log] [tgz] |
---|---|---|
author | Simon Pasquier <spasquier@mirantis.com> | Tue Feb 21 13:38:41 2017 +0100 |
committer | Simon Pasquier <spasquier@mirantis.com> | Tue Feb 21 13:38:41 2017 +0100 |
tree | 5d4981a4d1b9d966a84c3d9a2ec9d598b90ee209 | |
parent | 0c2999b8347c379e2eb5d7d7373c606bc851494b [diff] |
Fix Glance image size metrics Change-Id: I0b570381c855a636d87d24113ff652f6db046d6a
diff --git a/collectd/files/plugin/openstack_glance.py b/collectd/files/plugin/openstack_glance.py index 4efe103..f2e45ab 100644 --- a/collectd/files/plugin/openstack_glance.py +++ b/collectd/files/plugin/openstack_glance.py
@@ -66,7 +66,7 @@ return d.get('size', 0) def groupby_size(d): - p = 'public' if d.get('is_public', True) else 'private' + p = d['visibility'] status = d.get('status', 'unknown').lower() if is_snap(d): return 'snapshots_size.%s.%s' % (p, status)