mirror of
https://github.com/zrepl/zrepl.git
synced 2025-06-20 09:47:50 +02: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",
|
Name: "time",
|
||||||
Help: "seconds spent in pruner",
|
Help: "seconds spent in pruner",
|
||||||
ConstLabels: prometheus.Labels{"zrepl_job":j.name},
|
ConstLabels: prometheus.Labels{"zrepl_job":j.name},
|
||||||
}, []string {})
|
}, []string{"prune_side"})
|
||||||
j.prunerFactory, err = pruner.NewSinglePrunerFactory(in.Pruning, j.promPruneSecs)
|
j.prunerFactory, err = pruner.NewSinglePrunerFactory(in.Pruning, j.promPruneSecs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "cannot build snapjob pruning rules")
|
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.keepRules,
|
||||||
f.retryWait,
|
f.retryWait,
|
||||||
f.considerSnapAtCursorReplicated,
|
f.considerSnapAtCursorReplicated,
|
||||||
f.promPruneSecs.WithLabelValues(),
|
f.promPruneSecs.WithLabelValues("local"),
|
||||||
},
|
},
|
||||||
state: Plan,
|
state: Plan,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user