Fwd: Fix for logwatch to recognize dovecot starting up message with version number

"Kirk Bauer" <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
---------- Forwarded message ----------
From: Gilles Detillieux <[email protected]>
Date: Dec 13, 2007 2:04 PM
Subject: Fix for logwatch to recognize dovecot starting up message
with version number
To: [email protected]
Cc: Gilles Detillieux <[email protected]>


See also: https://bugzilla.redhat.com/show_bug.cgi?id=424171
  logwatch doesn't recognize dovecot starting up message with version number

Description of problem:
Logwatch 7.3.6 handles dovecot 1.0 log entries for the most part,
but fails to properly recognize the "starting up" message, which now
includes a version number.

Actual results:
"dovecot: Dovecot v1.0.7 starting up: 1 Times(s)" appears under **Unmatched
Entries**

Expected results:
"Dovecot restarted 1 time(s)."

Patch to make logwatch 7.3.6's dovecot script recognize Dovecot startup
with version number:

--- logwatch/scripts/services/dovecot.orig      2007-11-22
05:16:21.000000000 -0600
+++ logwatch/scripts/services/dovecot   2007-12-12 22:42:24.000000000 -0600
@@ -56,7 +56,7 @@ while (defined($ThisLine = <STDIN>)) {
         # We don't care about these
      } elsif ( $ThisLine =~ /Killed with signal /) {
          $End++;
-     } elsif ( $ThisLine =~ /Dovecot starting up$/) {
+     } elsif ( $ThisLine =~ /Dovecot (v\d[^ ]* |)starting up$/) {
          $Restarts++;
          $End = 0;
      } elsif ( ($User, $Host) = ( $ThisLine =~ /^pop3-login: Login:
(.*?) \[(.*)\]/ ) ) {



--
Gilles R. Detillieux              E-mail: <[email protected]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)




-- 
Kirk Bauer <[email protected]>
http://linux.kaybee.org | www.logwatch.org
Author, Automating UNIX & Linux Administration
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.