aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-27 12:12:07 +0100
committerGitHub <noreply@github.com>2018-04-27 12:12:07 +0100
commit828094ac8185d00e18e489e6a6f5193cf11db975 (patch)
tree9c99004e75c0f84b67a527faa875ba90d01be060
parenta47013e73a1ed0b1b18ecfc81bb5a6dd58d71d91 (diff)
parent8c6e661308dcd8f3e149462c04cac02f66d9e6f6 (diff)
downloadrspamd-828094ac8185d00e18e489e6a6f5193cf11db975.tar.gz
rspamd-828094ac8185d00e18e489e6a6f5193cf11db975.zip
Merge pull request #2200 from moisseev/rspamd_stats
[Minor] rspamd_stats: skip journalctl header
-rwxr-xr-xutils/rspamd_stats.pl5
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;