Espaced '/' character in query to InfluxDB

This commit is contained in:
Piotr Szczesniak 2015-10-05 16:10:10 +02:00
parent ddcb605109
commit 0b798906e7

View File

@ -124,7 +124,8 @@ func (s *influxdbSource) GetUsagePercentile(kind api.ResourceName, perc int64, i
if exactMatch {
imgPattern = "='" + image + "'"
} else {
imgPattern = "=~/^" + image + "/"
// Escape character "/" in image pattern.
imgPattern = "=~/^" + strings.Replace(image, "/", "\\/", -1) + "/"
}
var namespaceCond string
if namespace != "" {