Commit 06323b8e by Kyle Brandt Committed by GitHub

AzureMonitor: select plugin route from cloudname (#27273)

* AzureMonitor: select plugin route from cloudname
fixes #27243
parent 42e8cb51
......@@ -223,15 +223,15 @@ func (e *AzureMonitorDatasource) createRequest(ctx context.Context, dsInfo *mode
return nil, errors.New("Unable to find datasource plugin Azure Monitor")
}
cloudName := dsInfo.JsonData.Get("cloudName").MustString("azuremonitor")
var azureMonitorRoute *plugins.AppPluginRoute
for _, route := range plugin.Routes {
if route.Path == "azuremonitor" {
if route.Path == cloudName {
azureMonitorRoute = route
break
}
}
cloudName := dsInfo.JsonData.Get("cloudName").MustString("azuremonitor")
proxyPass := fmt.Sprintf("%s/subscriptions", cloudName)
u, err := url.Parse(dsInfo.Url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment