Commit cdd17f48 by pkarmaka Committed by Torkel Ödegaard

[Bug Fix] Opentsdb Alias issue (#9613)

parent 43d45f9f
......@@ -441,7 +441,7 @@ function (angular, _, dateMath) {
}
function mapMetricsToTargets(metrics, options, tsdbVersion) {
var interpolatedTagValue;
var interpolatedTagValue, arrTagV;
return _.map(metrics, function(metricData) {
if (tsdbVersion === 3) {
return metricData.query.index;
......@@ -453,7 +453,8 @@ function (angular, _, dateMath) {
return target.metric === metricData.metric &&
_.every(target.tags, function(tagV, tagK) {
interpolatedTagValue = templateSrv.replace(tagV, options.scopedVars, 'pipe');
return metricData.tags[tagK] === interpolatedTagValue || interpolatedTagValue === "*";
arrTagV = interpolatedTagValue.split('|');
return _.includes(arrTagV, metricData.tags[tagK]) || interpolatedTagValue === "*";
});
}
});
......
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