Plugin: AzureMonitor - Reapply MetricNamespace support (#17282)

* Reapply MetricNamespace support

* Fixing tests

* refactor: move metricnamespace param to backend

* refactor: remove unused function

* azuremonitor: migration for new metric namespace field

* azuremonitor: add template query for metric namespace with a sub

* docs: template queries for azure monitor

Adds new lines for the metricnamespace template function and fixes
some messed up lines
This commit is contained in:
Raphael Couto
2019-07-19 20:43:52 -03:00
committed by Daniel Lee
parent 9f415e84b4
commit bc0da1bbfc
14 changed files with 350 additions and 49 deletions

View File

@@ -119,6 +119,7 @@ func (e *AzureMonitorDatasource) buildQueries(queries []*tsdb.Query, timeRange *
params.Add("interval", timeGrain)
params.Add("aggregation", fmt.Sprintf("%v", azureMonitorTarget["aggregation"]))
params.Add("metricnames", fmt.Sprintf("%v", azureMonitorTarget["metricName"]))
params.Add("metricnamespace", fmt.Sprintf("%v", azureMonitorTarget["metricNamespace"]))
dimension := strings.TrimSpace(fmt.Sprintf("%v", azureMonitorTarget["dimension"]))
dimensionFilter := strings.TrimSpace(fmt.Sprintf("%v", azureMonitorTarget["dimensionFilter"]))