remove the read lines counter when the log file stops being tailed

Signed-off-by: Edward Welch <edward.welch@grafana.com>
pull/1776/head
Edward Welch 5 years ago committed by Ed Welch
parent 6f3489e661
commit 8726033bfa
  1. 1
      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)

Loading…
Cancel
Save