From e130c7fa940877e1783bebf9a7c94430b2584fe0 Mon Sep 17 00:00:00 2001 From: Adrian Lopez Date: Fri, 14 Jul 2017 12:32:55 +0200 Subject: [PATCH] Do now show journald header Without ``-q`` the journalctl shows a header like: ``` -- Logs begin at Wed 2016-11-30 08:49:56 CET. -- ``` This line is considered part of the logs and should not be. --- plugins-scripts/Nagios/CheckLogfiles/Search/Journald.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins-scripts/Nagios/CheckLogfiles/Search/Journald.pm b/plugins-scripts/Nagios/CheckLogfiles/Search/Journald.pm index c4a8872..d541555 100755 --- a/plugins-scripts/Nagios/CheckLogfiles/Search/Journald.pm +++ b/plugins-scripts/Nagios/CheckLogfiles/Search/Journald.pm @@ -49,7 +49,7 @@ sub collectfiles { if ($self->{journaldunit}) { $cmdline = $cmdline." --unit '".$self->{journaldunit}."'"; } - $cmdline = $cmdline." --since '".strftime("%Y-%m-%d %H:%M:%S", localtime($self->{journald}->{since}))."'|"; + $cmdline = $cmdline." -q --since '".strftime("%Y-%m-%d %H:%M:%S", localtime($self->{journald}->{since}))."'|"; if ($fh->open($cmdline)) { push(@{$self->{relevantfiles}}, { filename => $self->{logfile},