mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Use correct label name for metric name in rule.
This commit is contained in:
parent
6929c10acf
commit
c21450a089
|
@ -27,7 +27,7 @@ func (rule *Rule) Eval(timestamp *time.Time) ast.Vector {
|
|||
|
||||
// Override the metric name and labels.
|
||||
for _, sample := range vector {
|
||||
sample.Metric["metric"] = model.LabelValue(rule.name)
|
||||
sample.Metric["name"] = model.LabelValue(rule.name)
|
||||
for label, value := range rule.labels {
|
||||
if value == "" {
|
||||
delete(sample.Metric, label)
|
||||
|
|
Loading…
Reference in a new issue