Bug 101744 - up2date section of logwatch lists everything as undefined
up2date section of logwatch lists everything as undefined
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: logwatch (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-06 10:55 EDT by matt
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-20 15:06:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
unified diff of update script (for logwatch) (2.12 KB, text/plain)
2003-08-07 16:29 EDT, matt
no flags Details
up2date script for logwatch (2.17 KB, text/plain)
2003-08-12 09:47 EDT, matt
no flags Details

  None (edit)
Description matt 2003-08-06 10:55:28 EDT
The up2date section of the logwatch mailings (RH9) lists everything that 
happened as undefined, even though the script looks like it's trying to filter 
out the frivilous stuff.  For those of us who run up2date as a cron job, this 
results in logwatch messages that are *very* long and pointless.

To fix it, you have to make changes to the regex 
in /etc/log.d/scripts/services/up2date

Here's what I did, in the while loop:

---------------

while (defined($ThisLine = <STDIN>)) {
   if ( $Debug >= 5 ) {
      print STDERR "DEBUG($DebugCounter): $ThisLine";
      $DebugCounter++;
   }
   if ( ( $ThisLine =~ /updating login info/ ) or
        ( $ThisLine =~ /Opening rpmdb in \/var\/lib\/rpm\/ with option ./ ) or
        ( $ThisLine =~ /successfully retrieved authentication token from 
up2date server/ ) or
        ( $ThisLine =~ /availablePackageList from network/ ) or
        ( $ThisLine =~ /logging into up2date server/ ) or
        ( $ThisLine =~ /A socket error occurred/ ) or
        ( $ThisLine =~ /new up2date run started/ ) or
        ( $ThisLine =~ /A protocol error occurred/ ) or
        ( $ThisLine =~ /Error communicating with server\.  The message was:/ ) 
or
        ( $ThisLine =~ /deleting \/var\/spool\/up2date\// ) ) {
      # We don't care about these
   } elsif ( $ThisLine =~ /installing packages/ ) {
      $PackageInstalled{$ThisLine}++;
   } elsif ( $ThisLine =~ /Adding packages/ ) {
      $PackageAddedToProfile{$ThisLine}++;
   } elsif ( $ThisLine =~ /Removing packages/ ) {
      $PackageRemovedFromProfile{$ThisLine}++;
   } else {
      # Report any unmatched entries...
       push @OtherList,$ThisLine;
   }
}
Comment 1 Elliot Lee 2003-08-07 14:22:17 EDT
Could you send a unified diff, please? Create a new attachment containing the patch.

Thanks...
Comment 2 matt 2003-08-07 16:29:33 EDT
Created attachment 93492 [details]
unified diff of update script (for logwatch)

Here is the unified diff of the update script (for logwatch)
Comment 3 matt 2003-08-12 09:47:07 EDT
Created attachment 93600 [details]
up2date script for logwatch

Another common log entry snuck through and was marked as 'undefined' in
logwatch.  This updated udiff catches it.
Comment 4 Elliot Lee 2004-08-20 15:02:38 EDT
Many thanks - it's in CVS now, should show up in rawhide soon.

Note You need to log in before you can comment on or make changes to this bug.