From 073f52ec8ba930288acdede43b03b5757d898c92 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 26 May 2022 19:15:50 +0200 Subject: [PATCH] Don't bail out from systemd log reader when reaching the end The log search starts at the current time, i.e. the end of the journal (`SeekTail()` / `SeekRealtimeUsec`) and thus runs into an EOF. Not a big deal because the code takes care of that, but the log-reading loop is exited then and further messages are ignored. --- postfix_exporter.go | 1 - 1 file changed, 1 deletion(-) diff --git a/postfix_exporter.go b/postfix_exporter.go index 226542d..d387b3a 100644 --- a/postfix_exporter.go +++ b/postfix_exporter.go @@ -634,7 +634,6 @@ func (e *PostfixExporter) StartMetricCollection(ctx context.Context) { if err != io.EOF { log.Printf("Couldn't read journal: %v", err) } - return } e.CollectFromLogLine(line) gauge.Set(1)