diff --git a/public/app/plugins/datasource/influxdb/queryCtrl.js b/public/app/plugins/datasource/influxdb/queryCtrl.js index d2b8b1e1df7..00e12ea05bd 100644 --- a/public/app/plugins/datasource/influxdb/queryCtrl.js +++ b/public/app/plugins/datasource/influxdb/queryCtrl.js @@ -45,10 +45,10 @@ function (angular, _) { query = 'SHOW MEASUREMENTS'; } else if (index % 2 === 1) { queryType = 'TAG_KEYS'; - query = 'SHOW TAG KEYS FROM ' + measurement; + query = 'SHOW TAG KEYS FROM "' + measurement + '"'; } else { queryType = 'TAG_VALUES'; - query = "SHOW TAG VALUES FROM " + measurement + " WITH KEY = " + $scope.segments[$scope.segments.length - 2].value; + query = 'SHOW TAG VALUES FROM "' + measurement + '" WITH KEY = ' + $scope.segments[$scope.segments.length - 2].value; } console.log('getAltSegments: query' , query);