diff --git a/pkg/promtail/targets/tailer.go b/pkg/promtail/targets/tailer.go index c15ce32b98d8..a0926bcb6605 100644 --- a/pkg/promtail/targets/tailer.go +++ b/pkg/promtail/targets/tailer.go @@ -147,6 +147,7 @@ func (t *tailer) stop() error { <-t.done filesActive.Add(-1.) // When we stop tailing the file, also un-export metrics related to the file + readLines.DeleteLabelValues(t.path) readBytes.DeleteLabelValues(t.path) totalBytes.DeleteLabelValues(t.path) logLengthHistogram.DeleteLabelValues(t.path)