diff --git a/monitoring/api/monitor.py b/monitoring/api/monitor.py index 9fdd94e8..e4186051 100644 --- a/monitoring/api/monitor.py +++ b/monitoring/api/monitor.py @@ -33,7 +33,8 @@ def monascaclient(request, password=None): api_version = "2_0" insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None) - endpoint = base.url_for(request, 'monitoring') + service_type = getattr(settings, 'MONITORING_SERVICE_TYPE', 'monitoring') + endpoint = base.url_for(request, service_type) if endpoint.endswith('/'): endpoint = endpoint[:-1] LOG.debug('monascaclient connection created using token "%s" , url "%s"' %