*BSD News Article 35604


Return to BSD News archive

Xref: sserve comp.sys.sun.admin:36225 comp.unix.bsd:14868
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!uunet!gater3.sematech.org!pulitzer.eng.sematech.org!fennessq
From: fennessq@thecount.eng.sematech.org (Quentin Fennessy)
Newsgroups: comp.sys.sun.admin,comp.unix.bsd
Subject: Re: want syslog to pipe entry to command
Date: 8 Sep 1994 20:06:05 GMT
Organization: SEMATECH, Austin, Texas
Lines: 33
Message-ID: <34nqrd$e6v@pulitzer.eng.sematech.org>
References: <34nie0$c69@spruce.cic.net>
Reply-To: quentin.fennessy@sematech.org
NNTP-Posting-Host: thecount.eng.sematech.org

In article <34nie0$c69@spruce.cic.net>,
Paul Southworth <pauls@locust.cic.net> wrote:
>
>I want to have a script that will act on certain syslog messages as they
>arrive (using the syslog entry as either stdin or an argument).
>
>What I wish for is a functional syslog.conf entry like this:
>
>foo.debug			/var/log/syslog, |/usr/local/bin/snork
>

Paul -
	If you make the output file for syslogd to be a named pipe,
you can have a program listening on the other end, ready to 
process your data.  For example:

syslog.conf entry:

	foo.debug:		/var/log/syslog, /usr/local/etc/foopipe

Make a named pipe:

	# mknod /usr/local/etc/foopipe

Set up a process listening on the pipe:

	# foo-processor < /usr/local/etc/foopipe

I think foo-processor should be line-oriented -- don't start work
until EOL.  
	  
-- 
Quentin Fennessy