Fix prometheus with multiple jobs

This commit is contained in:
InsanePrawn 2018-11-21 04:26:03 +01:00
parent c4e23862cd
commit 22d9830baa
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ func snapJob(g *config.Global, in *config.SnapJob) (j *SnapJob, err error) {
Name: "time",
Help: "seconds spent in pruner",
ConstLabels: prometheus.Labels{"zrepl_job":j.name},
}, []string {})
}, []string{"prune_side"})
j.prunerFactory, err = pruner.NewSinglePrunerFactory(in.Pruning, j.promPruneSecs)
if err != nil {
return nil, errors.Wrap(err, "cannot build snapjob pruning rules")

View File

@ -187,7 +187,7 @@ func (f *SinglePrunerFactory) BuildSinglePruner(ctx context.Context, target Targ
f.keepRules,
f.retryWait,
f.considerSnapAtCursorReplicated,
f.promPruneSecs.WithLabelValues(),
f.promPruneSecs.WithLabelValues("local"),
},
state: Plan,
}