diff --git a/CHANGELOG.md b/CHANGELOG.md index b8f4785457..dc3262faef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#1573](https://github.com/thanos-io/thanos/pull/1573) `AliYun OSS` object storage, see [documents](docs/storage.md#aliyun-oss) for further information. - [#1680](https://github.com/thanos-io/thanos/pull/1680) Add a new `--http-grace-period` CLI option to components which serve HTTP to set how long to wait until HTTP Server shuts down. - [#1712](https://github.com/thanos-io/thanos/pull/1712) Rename flag on bucket web component from `--listen` to `--http-address` to match other components. +- [#1733](https://github.com/thanos-io/thanos/pull/1733) New metric `thanos_compactor_iterations_total` on Thanos Compactor which shows the number of successful iterations. ### Fixed diff --git a/cmd/thanos/compact.go b/cmd/thanos/compact.go index ba09994913..2589a251ee 100644 --- a/cmd/thanos/compact.go +++ b/cmd/thanos/compact.go @@ -168,10 +168,15 @@ func runCompact( Name: "thanos_compactor_retries_total", Help: "Total number of retries after retriable compactor error", }) + iterations := prometheus.NewCounter(prometheus.CounterOpts{ + Name: "thanos_compactor_iterations_total", + Help: "Total number of iterations that were executed successfully", + }) halted.Set(0) reg.MustRegister(halted) reg.MustRegister(retried) + reg.MustRegister(iterations) downsampleMetrics := newDownsampleMetrics(reg) @@ -313,6 +318,7 @@ func runCompact( return runutil.Repeat(5*time.Minute, ctx.Done(), func() error { err := f() if err == nil { + iterations.Inc() return nil }