Improve marker file current time metrics. (#3946)

Currently we'll keep the last recorded time, but if the marker file doesn't exist anymore we should reset it.
This would allow us to build consistent alert based on marker files that are too far behind.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
pull/3949/head
Cyril Tovena 4 years ago committed by GitHub
parent 1fb06cc64f
commit 5be93e0480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/storage/stores/shipper/compactor/retention/marker.go

@ -201,6 +201,8 @@ func (r *markerProcessor) Start(deleteFunc func(ctx context.Context, chunkId []b
}
if len(paths) == 0 {
level.Info(util_log.Logger).Log("msg", "no marks file found")
r.sweeperMetrics.markerFileCurrentTime.Set(0)
continue
}
for i, path := range paths {
level.Debug(util_log.Logger).Log("msg", "processing mark file", "path", path)

Loading…
Cancel
Save