Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have Logwatch installed from my distro repos, but it refuses to display any Postfix output:
Code:
root@dingo ! # logwatch --print
################### Logwatch 7.3.6 (05/19/07) ####################
Processing Initiated: Fri Mar 20 16:47:17 2009
Date Range Processed: yesterday
( 2009-Mar-19 )
Period is day.
Detail Level of Output: 5
Type of Output: unformatted
Logfiles for Host: dingo.DOMAIN.net
##################################################################
--------------------- httpd Begin ------------------------
<SNIP>
---------------------- httpd End -------------------------
--------------------- Disk Space Begin ------------------------
<SNIP>
---------------------- Disk Space End -------------------------
###################### Logwatch End #########################
My 'service' line is set to 'all' as per the default:
Code:
root@dingo ~ # grep '^Service' /usr/share/logwatch/default.conf/logwatch.conf
Service = All
Service = "-zz-network" # Prevents execution of zz-network service, which
Service = "-zz-sys" # Prevents execution of zz-sys service, which
Service = "-eximstats" # Prevents execution of eximstats service, which
What shows if you would 'logwatch --service postfix --print --Detail <level> --debug <level> --range All --numeric'? (Play with "level" being Med and High)
Thanks for the detailed logs. Looking a bit further I found my Logwatch is rather stale (7.3.6) for testing compared to the standalone parser at http://www.mikecappella.com/logwatch/. See if running that one works "better": unpack, install (or not, move to any tempdir for testing), change location of ^my.$config_file in postfix-logwatch, then run as 'perl -T ./postfix-logwatch /var/log/maillog'. If that produces any or more output (no --debug) you know the cause. If not then maybe post a piece of (anonymized) log for testing?
As I was putting that up to pastebin, I had the thought that perhaps Logwatch can't handle the ISO timestamps? That would be annoying, but I think I can work around it in syslog-ng by logging twice to 2 different files, an ISO version and a 'normal' version
As I was putting that up to pastebin, I had the thought that perhaps Logwatch can't handle the ISO timestamps? That would be annoying, but I think I can work around it in syslog-ng by logging twice to 2 different files, an ISO version and a 'normal' version
Good call! It is the ISO date. No need to log twice. You only need a wee script to massage the date into a format Logwatch is willing to read. In the long run it should be patched to accept ISO dates ofcourse. Maybe something for their bug tracker or mailing list?
Thinking back, I actually only changed the date format for an exercise I was doing with logging to SQL. I'm over that 'project' so I can just change it back...
Thanks again for your help, I'll mark this one as SOLVED
Cool. Glad you've solved that. For anyone looking, in shell the conversion from ISO.* to ancient syslog-style date should go something like 'ISO2syslog() { DATE="$1"; DATE=${DATE/+*/}; date --date=${DATE} "+%b %e %H:%M:%S"; }'.
FYI: postfix-logwatch runs both standalone, and replaces the postfix filter shipped with logwatch. Due to licensing differences, I am no longer updating the logwatch source with the postfix filter, so the most up to date will be available at the link above.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.