Commit 57d36b3d by bergquist

feat(alerting): transform labels into tags for prometheus tsdb

parent 3827c0a6
...@@ -157,6 +157,11 @@ func parseResponse(value pmodel.Value, query *PrometheusQuery) (map[string]*tsdb ...@@ -157,6 +157,11 @@ func parseResponse(value pmodel.Value, query *PrometheusQuery) (map[string]*tsdb
for _, v := range data { for _, v := range data {
series := tsdb.TimeSeries{ series := tsdb.TimeSeries{
Name: formatLegend(v.Metric, query), Name: formatLegend(v.Metric, query),
Tags: map[string]string{},
}
for k, v := range v.Metric {
series.Tags[string(k)] = string(v)
} }
for _, k := range v.Values { for _, k := range v.Values {
......
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