mirror of
https://github.com/zrepl/zrepl.git
synced 2025-01-22 22:28:47 +01:00
Fix prometheus with multiple jobs
This commit is contained in:
parent
c4e23862cd
commit
22d9830baa
@ -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")
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user