From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 23AAF138247 for ; Fri, 27 Dec 2013 06:57:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B449E09F2; Fri, 27 Dec 2013 06:57:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F24EFE09DD for ; Fri, 27 Dec 2013 06:57:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 262E333F6F2 for ; Fri, 27 Dec 2013 06:57:18 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: -1.493 X-Spam-Level: X-Spam-Status: No, score=-1.493 tagged_above=-999 required=5.5 tests=[AWL=-0.940, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.551, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no Received: from smtp.gentoo.org ([IPv6:::ffff:127.0.0.1]) by localhost (smtp.gentoo.org [IPv6:::ffff:127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mkKZ-DzTRrae for ; Fri, 27 Dec 2013 06:57:12 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BA7D633F64C for ; Fri, 27 Dec 2013 06:57:11 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VwRM2-0006IM-9l for gentoo-dev@gentoo.org; Fri, 27 Dec 2013 07:57:06 +0100 Received: from ip68-231-22-224.ph.ph.cox.net ([68.231.22.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Dec 2013 07:57:06 +0100 Received: from 1i5t5.duncan by ip68-231-22-224.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Dec 2013 07:57:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-dev] Re: Recommend cronie instead of vixie-cron in handbook? Date: Fri, 27 Dec 2013 06:56:45 +0000 (UTC) Message-ID: References: <1386708905.1931.2.camel@belkin5> <0afb01cef617$3d667a90$b8336fb0$@acm.org> <52A8BC3F.3020905@gentoo.org> <52AC931B.8020609@gentoo.org> <52BCFBD7.3010500@sporkbox.us> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip68-231-22-224.ph.ph.cox.net User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT 6daf184 /usr/src/portage/src/egit-src/pan2) X-Archives-Salt: acca97a4-8b7a-4172-b97f-7f1b55137913 X-Archives-Hash: 09addbdc913e5c4dd0864ab0aad8425a Daniel Campbell posted on Thu, 26 Dec 2013 22:02:31 -0600 as excerpted: > On 12/25/2013 08:43 AM, Duncan wrote: >> >> I [replaced vixie-cron with cronie] too, a few days ago. >> >> TL;DR: Drop-in but for the log-spamming. =:^( >> >> While cronie itself was simple and drop-in for vixie-cron, it DID start >> rather severely log-spamming, IIRC four log-lines every 10 minutes when >> the run-crons ran. > Could you share the lines that provided the filtering? I'm sure it would > help others. Your e-mail led me to check my logs to see if I have the > same, but I don't know where to look. I think I mentioned that I'm using syslog-ng here. ~arch, so version 3.4.6. Stable 3.4.2 should be similar but it may not be identical. I had started to post a big long explanation, but then decided simply posting my entire syslog-ng.conf file with a shorter explanation would be better. There's nothing really private in it. The way I handle filters is to setup the original message-selecting filters first, then combine them with AND NOT as appropriate in a second- level message-rejecting filter. I have two sets of filters, thus two second level filters into which the others feed, the spam filters and the category filters. The category filters are setup to select a particular category of messages; for instance, all messages from cron. The category selecting filter is then used in a log section, to route the selected messages to a particular file. The second level rejecting filter is in turn used to filter out all the categorized messages from the log stream going to the generic messages file, so it doesn't get the categorized messages and is thus less noisy, making it easier to process what /does/ come thru. The spam filters are setup similarly, with individual selection filters and a single second level rejection filter, except I don't want to log those messages at all, so the only thing the selection filters are used for is to feed into the rejection filter. Still, that seemed the simplest and most logical way to handle it, to me. Setup that way, the log sections stay short and simple, not the hairball of individual selection and rejection filters they could become otherwise. OK, the file is included inline after my sig, below... (Since I use pan for my lists via nntp://news.gmane.org, and pan normally yencodes attachments for USENET posting while most mail clients don't handle yenc, I won't try attaching the file that way as it'd come thru as gibberish to most. I could inline UUE it, but as it's text anyway, I'll post it inline with auto-wrapping off and hope it doesn't get mangled.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman @version: 3.4 @include "scl.conf" # /etc/syslog-ng/syslog-ng.conf # JED: don't etc-update replace! ################################################################################# ######### Options: syslog-ng general options ######### ################################################################################# options { threaded(yes); stats_freq (43200); mark_freq (3600); }; ################################################################################# ######### Sources: where messages come from ######### ################################################################################# source src { system(); internal(); }; ################################################################################# ######### Destinations: where messages go ######### ################################################################################# # NOTE: Default destination output format template # (admin guide section 11.1.2, templates and macros) #template default { # (template("${ISODATE} ${HOST} ${MSGHDR}${MSG}\n"); # template_escape(no); #}; # ${MSGHDR} further defines to "PROGRAM[PID]: " (note trailing space), # with a kernel MSGHDR obviously lacking [PID], so... # final format is: ISODATE HOST PROGRAM[PID] MSG(=content) ################################################### # global destinations destination messages { file ("/var/log/messages"); }; destination log-tty { file ("/dev/tty12"); }; # for programs like xconsole using /dev/console... #destination dev-console { # file ("/dev/console"); #}; ################################################### # categorized destinations destination IPTables { file ("/var/log/iptables"); }; destination dhcpcd { file ("/var/log/dhcpcd"); }; destination cron { file ("/var/log/cron"); }; destination portage { file ("/var/log/portage-msg"); }; ################################################################################# ######### Filters: which messages ######### ################################################################################# # log-spam pre-filters, combined in spam-global, below # sudo has its own, better log, but pam_unix spams it to syslog too filter spam-sudo { program ("sudo") ;}; # 2013.1217 kernel type=1006 (AUDIT_LOGIN) auditing enabled and logging # on cron's 10-minute run-crons. # kernel: type=1006 audit(1387288201.202:209): pid=5760 uid=0 old auid=501 # new auid=0 old ses=2 new ses=208 res=1 filter spam-audit { program ("kernel") and message ("type=1006 audit") ;}; ##################### # Combine all the log-spam filters into one filter spam-global { not filter (spam-audit) and not filter (spam-sudo) ;}; ################################################### # Category filters filter cat-IPTables { message ("IPTables:") ;}; filter cat-dhcpcd { program ("dhcpcd") ;}; filter cat-cron { program ("crond?" flags("ignore-case")) ;}; filter cat-portage { message (" portage") ;}; ##################### # /not/ the cat-filters above filter cat-not { not filter (cat-IPTables) and not filter (cat-dhcpcd) and not filter (cat-cron) and not filter (cat-portage) ;}; ################################################################################# ######### Logs: connect sources, filters, destinations ######### ################################################################################# # general case, minus the categorized, below log { source (src); filter (spam-global); filter (cat-not); destination (messages); }; log { source (src); filter (spam-global); filter (cat-not); destination (log-tty); }; ################################################### # These categorize log { source (src); filter (cat-IPTables); destination (IPTables); }; log { source (src); filter (cat-cron); destination (cron); }; log { source (src); filter (cat-dhcpcd); destination (dhcpcd); }; log { source (src); filter (cat-portage); destination (portage); };