From a9c92330f0e3181a126a2e31e6415b3f4acb0f5b Mon Sep 17 00:00:00 2001 From: Jernej Jakob Date: Wed, 7 Apr 2021 21:38:46 +0200 Subject: [PATCH] zmlogprocess: fix parsing of rsyslog precision timestamps --- src/libexec/zmlogprocess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexec/zmlogprocess b/src/libexec/zmlogprocess index 7ffce8218..a5b1faacb 100644 --- a/src/libexec/zmlogprocess +++ b/src/libexec/zmlogprocess @@ -224,7 +224,7 @@ sub run() { my $state = updateState(); open(LOG, "<$log_file") || die $!; - my $logregex = qr/(^.{15}) ((\d+\.\d+\.\d+\.\d+) \S+|(\S+)) ([^[]+)(\[(\d+)\])?: (.*)$/o; + my $logregex = qr/^(.{15}|\S+) ((\d+\.\d+\.\d+\.\d+) \S+|(\S+)) ([^[]+)(\[(\d+)\])?: (.*)$/o; my %host_data; my %host_qid_data; # hostname -> { qid -> { first, last } } init_counters(\%host_data);