[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: grep with actual date ?



On Tue, May 16, 2000 at 01:41:00PM +0100, Oliver Schoenknecht wrote:
> Hi there,
> 
> I am planning to do a daily system check with refused connects by 
> placing them in a cron job. So far, so good. But - and that's the 
> problem - does anyone know how to tell the "grep"-command to 
> filter just the refused connects of today and not all those which are 
> two weeks old ? This should happen each day frequently so any 
> help would be appreciated very well...

I use a homebrew toy for such things.  (Swatch liked to mailbomb me for
each 'interesting' line in the logs, and I didn't see any other log
thingies I liked.)

See http://www.cmc.net/~bem/isp/watcher, which is sort of cool because
not only is its own man page (gotta love perl), it's also PGP
clearsigned.   (Okay, so I was bored.)

Basically, I run it out of cron, and it mails me 'interesting' (or
'unknown', since unknown may be something I -should- be watching but
never saw before) items from the logs.

It probably needs work -- there are things I wish it could do, but it
does do 99.999% of what I need, so it's pretty low priority for me to
futz with.  If you wanna mess with it, it's GPL.. as long as you share,
I don't care what you do with it. :)

-- 
Brian Moore                       | Of course vi is God's editor.
      Sysadmin, C/Perl Hacker     | If He used Emacs, He'd still be waiting
      Usenet Vandal               |  for it to load on the seventh day.
      Netscum, Bane of Elves.



Reply to: