Use correct label name for metric name in rule.

pull/43/head
Julius Volz 12 years ago
parent 6929c10acf
commit c21450a089

@ -27,7 +27,7 @@ func (rule *Rule) Eval(timestamp *time.Time) ast.Vector {
// Override the metric name and labels. // Override the metric name and labels.
for _, sample := range vector { for _, sample := range vector {
sample.Metric["metric"] = model.LabelValue(rule.name) sample.Metric["name"] = model.LabelValue(rule.name)
for label, value := range rule.labels { for label, value := range rule.labels {
if value == "" { if value == "" {
delete(sample.Metric, label) delete(sample.Metric, label)

Loading…
Cancel
Save