diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-04-27 09:57:14 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-04-27 09:57:14 +0300 |
commit | 8c6e661308dcd8f3e149462c04cac02f66d9e6f6 (patch) | |
tree | b9ebb48493ecf11341dbc64bd558d5606edbaa4f | |
parent | 147df4300a76d4865f62cea0f3c9e33c2e8d34b0 (diff) | |
download | rspamd-8c6e661308dcd8f3e149462c04cac02f66d9e6f6.tar.gz rspamd-8c6e661308dcd8f3e149462c04cac02f66d9e6f6.zip |
[Minor] rspamd_stats: skip journalctl header
-rwxr-xr-x | utils/rspamd_stats.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl index 00f08ade8..f4f01dd85 100755 --- a/utils/rspamd_stats.pl +++ b/utils/rspamd_stats.pl @@ -723,6 +723,11 @@ sub log_time_format { elsif ( /^\w{3} (?:\s?\d|\d\d) \d\d:\d\d:\d\d\ \S+ newsyslog\[\d+\]: logfile turned over$/ ) { next; } + # Skip journalctl messages + # -- Logs begin at Mon 2018-01-15 11:16:24 MSK, end at Fri 2018-04-27 09:10:30 MSK. -- + elsif ( /^-- Logs begin at \w{3} \d{4}-\d\d-\d\d \d\d:\d\d:\d\d [A-Z]{3}, end at \w{3} \d{4}-\d\d-\d\d \d\d:\d\d:\d\d [A-Z]{3}\. --$/ ) { + next; + } else { print "Unknown log format\n"; exit 1; |