Bug 458580

Summary: logwatch + logrotate(dateext) wrong output
Product: [Fedora] Fedora Reporter: Jan ONDREJ <ondrejj>
Component: logwatchAssignee: Ivana Varekova <varekova>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: richardfearn
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-12 10:05:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan ONDREJ 2008-08-10 10:17:01 UTC
Description of problem:
Using logwatch + new logrotate

Version-Release number of selected component (if applicable):
logwatch-7.3.6-15.fc8
logrotate-3.7.6-2.2.fc8
logwatch-7.3.6-22.fc9.noarch
logrotate-3.7.6-5.fc9.i386

How reproducible:
always

Steps to Reproduce:
1. Remove old logfiles, if still present
   cd /var/log
   rm *.1 *.2 *.3 *.4 *.5 */*.1 */*.2 */*.3 */*.4 */*.5
   # add -f, if you are sure
2. verify, that dateext is set:
   grep ^dateext /etc/logrotate.conf
   ls -la /var/log/*-*
3. logwatch --range Yesterday --service postfix

  
Actual results:
Nothing (empty output). May be sometimes output is incomplete.

Expected results:
Some data.

Additional info:
I think there is a problem with logwatch configuration. For example this file contains:
/usr/share/logwatch/default.conf/logfiles/messages.conf
Archive = messages.*
Archive = archiv/messages.*

But does not contain:
Archive = messages-*

Logrotate in F8+ has an option "dateext" which saves old logs into filenames like: /var/log/messages-20080810
They are not parsed by current logwatch. Adding messages-* fix this probem.
This heve to be done for all configuration files. May be in upstream too.

Comment 1 Richard Fearn 2008-09-14 12:54:42 UTC
logwatch runs before logrotate each morning, so the automatically-generated logwatch e-mails will only be incorrect on Monday morning - Sunday's log entries will be split across two files due to rotation on Sunday morning.

Since dateext is a parameter, the logwatch config files should be updated to cope both dates *and* numbers in the archived logs.

Comment 2 Ivana Varekova 2008-09-16 09:14:10 UTC
This problem should be fixed by version 7.3.6-28.fc10. Could you please test it?

Comment 3 Jan ONDREJ 2008-09-16 09:55:51 UTC
I don't see fix in sources and config files in this version.

In maillog.conf there are still only these files:

Archive = maillog.*                                                             
Archive = syslog.*                                                              
Archive = archiv/maillog.*                                                      
Archive = mail.log.*.gz                                                         

Still same problem, I was tryed to rotate my logs manually and after this rotation there are no output of maillog.
I think this have to be done for other logfiles/*.conf files.

Please, update "needinfo" flag, because I am not "ondrejj" but "ondrejj" and I have no access to this flag.

Comment 4 Ivana Varekova 2008-09-16 10:32:42 UTC
The change is in fc10 branch for now, but I will put it to fc9 and attach a link here.

Comment 5 Ivana Varekova 2008-09-16 11:00:41 UTC
The package n-v-r is logwatch-7.3.6-24.fc9. Is this version ok?

Comment 6 Jan ONDREJ 2008-09-16 18:49:42 UTC
This looks OK, but does not work on my Fedora 9 machine. But I think problem is now on my side (yesterday's mail logs are missing in my logfile). I can't test this before it will be at least in fedora-testing repository for F8.

Please, request to add to fedora8-testing and I will make more tests.

logwatch-7.3.6-logrotate.patch looks to be OK.

Comment 7 Fedora Update System 2008-09-17 10:33:07 UTC
logwatch-7.3.6-17.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/logwatch-7.3.6-17.fc8

Comment 8 Richard Fearn 2008-09-22 20:13:24 UTC
> The package n-v-r is logwatch-7.3.6-24.fc9. Is this version ok?

I've downloaded it from Koji and installed it; I'll know if it's fixed the problem on Monday morning!

Thanks.

Comment 9 Fedora Update System 2008-09-25 00:08:46 UTC
logwatch-7.3.6-17.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update logwatch'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-8232

Comment 10 Jan ONDREJ 2008-10-13 05:21:17 UTC
Works well for me on F8. Please put this to stable.
Thank you.

Comment 11 Fedora Update System 2008-10-16 02:06:25 UTC
logwatch-7.3.6-17.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Richard Fearn 2008-10-20 19:41:18 UTC
I'm testing logwatch-7.3.6-25.fc9.noarch due to bug 462174, and this version correctly deals with log entries in the archived maillog. Thanks!