Merge "Don't send http_check_check metric"
diff --git a/collectd/files/plugin/collectd_openstack.py b/collectd/files/plugin/collectd_openstack.py
index a8fa999..1aeeb36 100644
--- a/collectd/files/plugin/collectd_openstack.py
+++ b/collectd/files/plugin/collectd_openstack.py
@@ -169,12 +169,11 @@
def _build_url(self, service, resource):
s = (self.get_service(service) or {})
- # the adminURL must be used to access resources with Keystone API v2
- if service == 'keystone' and \
- (resource in ['tenants', 'users'] or 'OS-KS' in resource):
- url = s.get('admin_url')
- else:
- url = s.get('url')
+ url = s.get('url')
+ # v3 API must be used in order to obtain tenants in multi-domain envs
+ if service == 'keystone' and (resource in ['projects',
+ 'users', 'roles']):
+ url = url.replace('v2.0', 'v3')
if url:
if url[-1] != '/':
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)
diff --git a/collectd/files/plugin/openstack_keystone.py b/collectd/files/plugin/openstack_keystone.py
index b84fbc6..e631baf 100644
--- a/collectd/files/plugin/openstack_keystone.py
+++ b/collectd/files/plugin/openstack_keystone.py
@@ -40,11 +40,11 @@
return 'enabled' if d.get('enabled') else 'disabled'
# tenants
- r = self.get('keystone', 'tenants')
+ r = self.get('keystone', 'projects')
if not r:
self.logger.warning('Could not find Keystone tenants')
return
- tenants_details = r.json().get('tenants', [])
+ tenants_details = r.json().get('projects', [])
status = self.count_objects_group_by(tenants_details,
group_by_func=groupby)
for s, nb in status.iteritems():
@@ -70,7 +70,7 @@
}
# roles
- r = self.get('keystone', 'OS-KSADM/roles')
+ r = self.get('keystone', 'roles')
if not r:
self.logger.warning('Could not find Keystone roles')
return