[prev in list] [next in list] [prev in thread] [next in thread]
List: inet-access
Subject: Re: syslog into perl
From: Paul Gregg <pgregg () niweb ! com>
Date: 2001-08-28 11:55:35
[Download RAW message or body]
In article <Pine.BSF.4.21.0108261052530.25419-100000@mercury.jorsm.com> you wrote:
> On Sun, 19 Aug 2001, Pete Templin wrote:
>>
>> List,
>>
>> Is there any easy way to have my syslog server put messages
>> received from routers into a perl script? If possible, I'd like to parse
>> the messages and send an email if "interesting" links should flap.
>
> tail -f /var/log/routerlogfile | parsingscript.pl
man syslog.conf
You can use:
*.* |/usr/local/sbin/parsingscript.pl
and assuming the script loops around a while(<STDIN>) {
then the perl script should stay open to read all lines piped to it
from syslog.
Syslog will reopen the script if it exits for any reason.
Paul.
--
| Paul Gregg |T: +44 (0) 28 90424190
| Technical Director |F: +44 (0) 28 90424709
| The Internet Business Ltd |W: http://www.tibus.com
| Holywood House, Innis Court |E: info@tibus.com
| Holywood, Co Down, BT18 9HF |P: pgregg@tibus.com
-
Recent archives of the list can be found at:
http://mix.twistedpair.ca/pipermail/inet-access/
Send 'unsubscribe' in the body to 'list-request@inet-access.net' to leave.
Eat sushi frequently. inet@inet-access.net is the human contact address.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic