Merge pull request #45 from SwannCroiset/check_api_fix
Fix openstack_check_api for unknown service
diff --git a/collectd/files/plugin/check_openstack_api.py b/collectd/files/plugin/check_openstack_api.py
index 9d2ef59..44a5b2b 100644
--- a/collectd/files/plugin/check_openstack_api.py
+++ b/collectd/files/plugin/check_openstack_api.py
@@ -69,6 +69,7 @@
self.logger.notice(
"No check found for service '%s', skipping it" % name)
status = self.UNKNOWN
+ check = {}
else:
check = self.CHECK_MAP[name]
url = self._service_url(service['url'], check['path'])