From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Nl6l0-0001lQ-La for garchives@archives.gentoo.org; Fri, 26 Feb 2010 20:25:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4CC1CE0B0C; Fri, 26 Feb 2010 20:24:35 +0000 (UTC) Received: from mail-ew0-f222.google.com (mail-ew0-f222.google.com [209.85.219.222]) by pigeon.gentoo.org (Postfix) with ESMTP id 128C4E0B0C for ; Fri, 26 Feb 2010 20:24:34 +0000 (UTC) Received: by ewy22 with SMTP id 22so219308ewy.26 for ; Fri, 26 Feb 2010 12:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=oTU1s77sCtoZS9YQDIXRygOi0N+QjwxFsLKleaYDGSc=; b=lrKfxrQJIOLPNwgJ/dbzkDhwOaLjYIgtddWBdNwJNYLd/VglW/xeottI9flMJIgEG/ Tx++jx2hCXnyyqwTN7N2svszmgH/Spcyt2llikAqfR2nbWmUbEd83VUX0KzTYVn2TyoH oRBmr+B/XYiXAki9X5gevRrohxx8cWBENnGLs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=Z6ybAR1jAeFwPsaHMTsS1/473sN0tLYK/a1m1M3ACJatnThxVxRZTTp0mw1SvghjMr jN1FcTbT107iqYhbqRTd5b0AxvSrzQsrlk1pzIOFwIKbYnXljB1XpaSwZl42+KMo3qMm KL0ysUmaIsViXpvq9Sk7KBsE22NnPZyfIS3V4= Received: by 10.213.38.68 with SMTP id a4mr467117ebe.54.1267215874296; Fri, 26 Feb 2010 12:24:34 -0800 (PST) Received: from nazgul.localnet (196-210-238-8.dynamic.isadsl.co.za [196.210.238.8]) by mx.google.com with ESMTPS id 15sm231211ewy.0.2010.02.26.12.24.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Feb 2010 12:24:33 -0800 (PST) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] attach a perl script to daemon services Date: Fri, 26 Feb 2010 22:22:08 +0200 User-Agent: KMail/1.13.0 (Linux/2.6.32-zen6; KDE/4.4.0; x86_64; ; ) References: <87tyt3g7rr.fsf@newsguy.com> In-Reply-To: <87tyt3g7rr.fsf@newsguy.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002262222.08735.alan.mckinnon@gmail.com> X-Archives-Salt: 5b1ecd33-6c6d-45ad-8102-fc4f31bedd37 X-Archives-Hash: 7086ac6c8902dcb38b80d235ba0c0fc3 On Friday 26 February 2010 20:40:40 Harry Putnam wrote: > ALERT [ This is a slightly rewritten repost from > `gmane.[...].perl.beginners', where it got no responses] > ------- --------- ---=--- --------- -------- > > My subject line is probably not really that > good at describing what I want advice on but here it is: > > I've setup one linux (gentoo) box as a logserver running rsyslog and > several other linux boxes sending syslog info to it. > > I want to set the server rsyslog.conf so that in addition to normal > logging to /var/log/whateverlogs it also writes everything to a named > pipe (fifo). > > Then tap into the fifo with a perl script that is written to be able > to sort and write the syslog output according to various regex that > may be part of startup cmd or fed in later during the running script. I don't know rsyslog at all (I use syslog-ng), but certain concepts are stable and universal. Any log daemon must receive logs from somewhere and send them somewhere, and almost all support the notion of sending logs to a process instead of a file- like destination. Does rsyslog not support something like this: destination "| /path/to/script.pl" -- alan dot mckinnon at gmail dot com