Don't remember if I already wrote about this. But ran into it tonibhg again. Logwatch as distributed with CentOS expects yum log files in different format. As result, logwatch will not report anything.
The patch is really simple (and attached). Hopefully it'll be part of 4.3 (if not sooner). The upstream is not likely to patch it, since they don't distribute yum at all. Maybe upstream's upstream, but than we'd have to wait for upstream to have reason to uply upstream's upstream change ;-)
I guess it's kind of bordercase. But since it applies to something where upstream and CentOS are different anyhow, maybe it is OK to introduce this change.
Your email got here just a little while after I finished finding the same thing (after several hours of looking) and coming up with a similar solution! Thanks for confirming my understanding of the problem! I had been wondering why I wasn't getting any updates when I keep seeing announcements of updates. I wounder how many other things in logwatch are broken that we aren't seeing?
I just installed CentOS a few weeks ago and am still learning about this distros' methods and such, but I vote for sending out a patch or fixed package for it. There is no sense publishing known broken code when it isn't likely that the upstream isn't going to do anything about it.
On Saturday 24 December 2005 11:00 pm, Aleksandar Milivojevic wrote:
Don't remember if I already wrote about this. But ran into it tonibhg again. Logwatch as distributed with CentOS expects yum log files in different format. As result, logwatch will not report anything.
The patch is really simple (and attached). Hopefully it'll be part of 4.3 (if not sooner). The upstream is not likely to patch it, since they don't distribute yum at all. Maybe upstream's upstream, but than we'd have to wait for upstream to have reason to uply upstream's upstream change ;-)
I guess it's kind of bordercase. But since it applies to something where upstream and CentOS are different anyhow, maybe it is OK to introduce this change.
Robert Tate wrote on Sun, 25 Dec 2005 01:22:18 -0500:
I just installed CentOS a few weeks ago and am still learning about this distros' methods and such, but I vote for sending out a patch or fixed package for it.
You should be aware that the Logwatch installed with RHEL and CentOS is *quite* old. Logwatch current is at 7.1. I installed it two weeks ago or so and it works fine. I don't remember getting any yum information, though. I didn't notice that until you mentioned it. I'll check about this when I'm back from vacation. Maybe it was just a period with no updates. If you do any tuning and want to have that included in the source you better patch against a current Logwatch and submit that diff. All in all the logwatch scripts look very much like catering for RH products, so I'd be a bit puzzled if a newer Logwatch would miss on this. I installed it on Suse systems as well and had to tune it heavily to get some decent reporting because it missed the log files and is very dependant on applications logging to their own log file.
Kai
On Sat, 2005-12-24 at 22:00 -0600, Aleksandar Milivojevic wrote:
Don't remember if I already wrote about this. But ran into it tonibhg again. Logwatch as distributed with CentOS expects yum log files in different format. As result, logwatch will not report anything.
The patch is really simple (and attached) ...
<snip>
My system, 4.2 i386, fully current AFAIK, does not have
scripts/shared/applyyumdate
but does have applyusdate.
Do I need to worry about this? If so, is there any conversion process needed to get the applyyumdate installed, convert existing logs or such?
TIA
Bill
scripts/shared/applyyumdate is a new file. The patch is to create it and point to in in the other files.
On Sunday 25 December 2005 09:56 am, William L. Maltby wrote:
On Sat, 2005-12-24 at 22:00 -0600, Aleksandar Milivojevic wrote:
Don't remember if I already wrote about this. But ran into it tonibhg again. Logwatch as distributed with CentOS expects yum log files in different format. As result, logwatch will not report anything.
The patch is really simple (and attached) ...
<snip>
My system, 4.2 i386, fully current AFAIK, does not have
scripts/shared/applyyumdate
but does have applyusdate.
Do I need to worry about this? If so, is there any conversion process needed to get the applyyumdate installed, convert existing logs or such?
TIA
Bill
William L. Maltby wrote:
My system, 4.2 i386, fully current AFAIK, does not have
scripts/shared/applyyumdate
but does have applyusdate.
The applyyumdate is new file (intriduced by patch). It does not exist in current logwatch. The yum.log logfile has same date format as standard syslog logfiles. However there's some differences after the date (hostname, process name, and PID are missing), so existing applystdate can't be used to process yum.log. I had two options. To patch applystddate to be able to parse yum.log (trivial, just add two lines to it), or to create separate file just for yum.log. I opted for later approach. Patching applystddate was bad choice (IMO) since it might change what gets filtered out from standard logfiles (where it is heavilly used). Reports generated by logwatch in CentOS could differ from logwatch in upstream. Creating new date filter script (applyyumdate) that would be used only for processing yum logfiles isn't going to change how standard logfiles are processed. Except for additonal yum section, the remainder of report would be exactly the same.
I don't have any Fedora Core system handy (right now). Fedora Core uses yum (same as CentOS). If the same bug exists in Fedora Core, submitting a patch might be good idea (since Fedora Core is upstream's testing ground). Anybody has FC3 or FC4 at hand, and could check how /var/log/yum.log looks like? Is it the same format as in CentOS 4. I guess it should be. AFAIK (and I could be wrong) yum in CentOS should be yum from FC? Does logwatch works correctly in FC3 and FC4 (as far as parsing yum.log)?
I ran FC4 befor wipeing it out to install CentOS 4.2. It logwatch used to report almost every day about updates. That is part of the reason I know something was wrong with it in CentOS. I can't go back now an check what the scripts look like any more.
On Sunday 25 December 2005 08:53 pm, Aleksandar Milivojevic wrote:
William L. Maltby wrote:
My system, 4.2 i386, fully current AFAIK, does not have
scripts/shared/applyyumdate
but does have applyusdate.
The applyyumdate is new file (intriduced by patch). It does not exist in current logwatch. The yum.log logfile has same date format as standard syslog logfiles. However there's some differences after the date (hostname, process name, and PID are missing), so existing applystdate can't be used to process yum.log. I had two options. To patch applystddate to be able to parse yum.log (trivial, just add two lines to it), or to create separate file just for yum.log. I opted for later approach. Patching applystddate was bad choice (IMO) since it might change what gets filtered out from standard logfiles (where it is heavilly used). Reports generated by logwatch in CentOS could differ from logwatch in upstream. Creating new date filter script (applyyumdate) that would be used only for processing yum logfiles isn't going to change how standard logfiles are processed. Except for additonal yum section, the remainder of report would be exactly the same.
I don't have any Fedora Core system handy (right now). Fedora Core uses yum (same as CentOS). If the same bug exists in Fedora Core, submitting a patch might be good idea (since Fedora Core is upstream's testing ground). Anybody has FC3 or FC4 at hand, and could check how /var/log/yum.log looks like? Is it the same format as in CentOS 4. I guess it should be. AFAIK (and I could be wrong) yum in CentOS should be yum from FC? Does logwatch works correctly in FC3 and FC4 (as far as parsing yum.log)? _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Robert Tate wrote:
I ran FC4 befor wipeing it out to install CentOS 4.2. It logwatch used to report almost every day about updates. That is part of the reason I know something was wrong with it in CentOS. I can't go back now an check what the scripts look like any more.
On Sunday 25 December 2005 08:53 pm, Aleksandar Milivojevic wrote:
William L. Maltby wrote:
My system, 4.2 i386, fully current AFAIK, does not have
scripts/shared/applyyumdate
but does have applyusdate.
<snip>
I have one FC4 box that I've looked at. The yum.log format appears to be identical to that in CentOS4. FC4 comes with logwatch-6.0.1-2 while CentOS4 has logwatch-5.2.2-1.EL4.1. There is obviously some difference but I'm not smart enough to find it. If anyone wants me to look at something specific or email a file(s), I'll be happy to do so.
On Sun, 2005-12-25 at 19:53 -0600, Aleksandar Milivojevic wrote:
William L. Maltby wrote:
My system, 4.2 i386, fully current AFAIK, does not have
scripts/shared/applyyumdate
but does have applyusdate.
The applyyumdate is new file (intriduced by patch). It does not exist in current logwatch.
<snip very useful and informative explanations>
Alexsandr,
Thanks for that education. I have much to learn about all this.
I feel I may have wasted list time too. When I looked at the patch, I just scanned for the "header" lines. Seeing the ".orig" I presumed there was a pre-existing file. If I had looked more closely, I would have seen it was a new file.
On Sun, 2005-12-25 at 11:07 -0500, Robert Tate wrote:
scripts/shared/applyyumdate is a new file. The patch is to create it and point to in in the other files.
On Sunday 25 December 2005 09:56 am, William L. Maltby wrote:
<snip>
Robert thanks for the reply. As noted above, I may have wasted your time.
Bill