Bug 783668 - logwatch does not produce any output with --range=yesterday
Summary: logwatch does not produce any output with --range=yesterday
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: logwatch
Version: 16
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-21 15:37 UTC by Piergiorgio Sartor
Modified: 2012-02-02 06:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-02 06:35:13 UTC
Type: ---


Attachments (Terms of Use)

Description Piergiorgio Sartor 2012-01-21 15:37:51 UTC
Description of problem:
Since F16, I do not get anymore logwatch email (from "cron.daily" job).

Version-Release number of selected component (if applicable):
logwatch-7.4.0-6.20110328svn50.fc16.noarch

How reproducible:
Always

Steps to Reproduce:
1.
Well, just from command line start "/usr/sbin/logwatch"

Actual results:
No output is produced.

Expected results:
The "yesterday" (default) output should appear.

Additional info:
This works (terminal print):

/usr/sbin/logwatch --range=today

This works too (email):

/usr/sbin/logwatch --range=today --output mail

This does not work (no terminal print nor email):

/usr/sbin/logwatch --range=yesterday

This works (long terminal print):

/usr/sbin/logwatch --range=all

Upper/lowercase ("today" vs. "Today") does not change the above results.
The commands above were executed as "root".

pg

Comment 1 Frank Crawford 2012-01-22 04:47:52 UTC
That is strange, it still works for me.

As a test, also try

/usr/sbin/logwatch --detail=high --range=yesterday

and see what you get.

The second thing to check is what is in the files in /etc/logwatch/conf

Finally also check what is in /etc/cron.daily/0logwatch as it is now a proper script rather than a link which it was in earlier releases, although this will not affect a normal run.

Comment 2 Piergiorgio Sartor 2012-01-22 11:36:22 UTC
Hi Frank,

actually I checked the "--detail" option.
It seems default is, like in F15, "Low", which seems to be mapped to "0".
Already with "1" (and as well as with "Med" or "High"), "logwatch" produces an output.

The script in "cron.daily" is not a link, anyway "/usr/sbin/logwatch" does not work from command line too...

In "/etc/logwatch/conf" there are 3 files and 2 folders:

-rw-r--r--  1 root root   81 Dec 19 15:38 ignore.conf
drwxr-xr-x. 2 root root 4096 Dec 19 15:38 logfiles
-rw-r--r--  1 root root  117 Jan 21 16:42 logwatch.conf
-rw-r--r--  1 root root   77 Dec 19 15:38 override.conf
drwxr-xr-x. 2 root root 4096 Dec 19 15:38 services

The folders are empty and the files, I would say too...

$> cat ignore.conf 
###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####

$> cat logwatch.conf
# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)

$> cat override.conf 
# Configuration overrides for specific logfiles/services may be placed here.

I actually modified the "logwatch.conf" adding "Detail = High", in order to get something.
In any case, this is just a temporary workaround, I guess it should work as it did before.

One more thing, which might be important, "selinux" is disabled on this PC.

Hope this helps,

bye,

pg

Comment 3 Frank Crawford 2012-01-22 12:25:27 UTC
One other thing that may be causing a difference between F15 and F16, in F15 and earlier, the "sendmail" filter was set to "Detail=3" (or "Med"), but is now "Low".  This pretty much meant that logwatch sending the daily email would be enough to generate a new logwatch output the following day.

With the new setting, it means that only unusual mail activity will generate an output and hence logwatch will not normally generate output for email.

To be equivalent to earlier I have an entry in /etc/logwatch/conf/override.conf of

services/sendmail: Detail = 3

The reason this occurred was compatibility with upstream releases.

Given what I have above, are you sure that "logwatch --range=yesterday" always fails, or just often, as the default setting of "Detail=low" for all services is almost equivalent to only send out exceptional events, and most often do nothing?

Comment 4 Piergiorgio Sartor 2012-01-22 14:03:52 UTC
Hi Frank,

today, "logwatch" was running with "Detail = High" and, of course, it produced an email.

After that email, removing the configuration option, still results in an output produced (command line). That is, the answer to your question seems to be "just often" and not "always".

One more thing, this particular PC does not run each day, so a "yesterday" watch does not always record an email event from a day before, since there was none...

About the resolution, I just applied your setting. Is this the "recommended" thing to do?

Do you think you'll provide an update or it is not considered important to have always an email?

Thanks a lot for the support,

bye,

pg

Comment 5 Frank Crawford 2012-01-23 09:56:17 UTC
I wouldn't say my setting is the "recommended" one, but it does bring it into line with what was previously done specifically by Fedora.

We are unlikely to add this into the normal distribution, as it was discussed at the time and decided that we would be compatible with the upstream version.  It is also fairly easy to apply your own override to give the same result.

Also, for many users it is not important to receive logwatch output every day, and adding this would make it harder for those very basic users to be able to go back to the upstream default.

Comment 6 Piergiorgio Sartor 2012-02-01 22:05:02 UTC
Hi Frank,

I guess, then, you can close this bug.

I assume I have all the information I need to "fix" this issue locally.

Thanks a lot again,

bye,

pg


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