AMBARI-24403 grafana is not showing any datapoints if the queue name contains special...
authorAkhil S Naik <asnaik@hortonworks.com>
Fri, 3 Aug 2018 16:45:31 +0000 (22:15 +0530)
committeravijayanhwx <avijayan@hortonworks.com>
Fri, 3 Aug 2018 16:45:31 +0000 (09:45 -0700)
ambari-metrics-grafana/ambari-metrics/datasource.js

index 65b834b..e7cd850 100644 (file)
@@ -284,7 +284,7 @@ define([
             var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator;
             var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform;
             var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
-            return self.doAmbariRequest({ url: '/ws/v1/timeline/metrics?metricNames=' + target.queue + metricTransform
+            return self.doAmbariRequest({ url: '/ws/v1/timeline/metrics?metricNames=' + encodeURIComponent(target.queue) + metricTransform
               + metricAggregator + '&appId=resourcemanager' + instanceId + '&startTime=' + from +
               '&endTime=' + to + precision + seriesAggregator }).then(
               getMetricsData(target)