Date: Thu, 01 Mar 2001 00:22:59 -0600 (CST) From: Don Read <dread@texas.net> To: Michael Lucas <mwlucas@blackhelicopters.org> Cc: freebsd-questions@FreeBSD.ORG, Fernando Gleiser <fgleiser@cactus.fi.uba.ar> Subject: Re: "if syslogd message appears, email immediately" program? Message-ID: <XFMail.010301002259.dread@texas.net> In-Reply-To: <20010227102649.A37911@blackhelicopters.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 27-Feb-01 Michael Lucas wrote:
> Fernando,
>
> I've tried this before, and wound up with a perl process that sucked
> up megs of RAM. This system runs for months without rebooting.
>
> Also, what happens when the log rotates?
>
> On Tue, Feb 27, 2001 at 12:27:52PM -0300, Fernando Gleiser wrote:
>> On Tue, 27 Feb 2001, Michael Lucas wrote:
>>
>> > Hello,
>> >
>> > I'm trying to find a program that watches syslogd continuously, and if
>> > a certain daemon makes a log entry it sends an email.
>> >
>> > We need this in real time, so logsurfer (or any other cron process)
>> > won't do it.
>> >
>> > Surely someone has written this before?
>>
>> You can do that with a 20-less lines perl script. It is something like:
>>
<snipo perlscript>
Wouldn't life be easy if you would add this in /etc/syslog.conf:
auth.notice | /usr/bin/mail -s "Sombody SU'ed" root@mydomain.com
Regards,
--
Don Read dread@texas.net
-- If you are going to sin, sin against God, not the bureaucracy.
God will forgive you but the bureaucrats won't.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010301002259.dread>
