[svlug] Monitoring scripts

Bill Selmeier bills at right-net.com
Mon Jun 3 00:25:30 PDT 2002


M

*********************************************************************
Bill Selmeier		20720 Maureen Way	voice  (408)257-7670
President		Saratoga, CA 95070	mobile (408)655-3400
RightNet, Inc.	     http://www.right-net.com	bills at right-net.com

On Sun, 2 Jun 2002, Walter Reed wrote:

> On Sun, Jun 02, 2002 at 03:28:08PM -0700, Daniel Curry wrote:
> > I am looking for a few scripts.  It seems we have been having s few
> > problems with our apps servers, but my internal monitoring has not been
> > catching them.  I am looking for a few sample scripts to access a URL,
> > grep for a specific word or phrase, and send an e-mail or other message
> > when the grep or url access fails.  Does anyone have any suggestions.  I
> > have looked into apps such sitescope, but would really prefer to stay
> > OSS and non-OS dependent.
>
> Well, you can try a really simple shell script that calls
> wget -O - http://blahurl | grep whatever
> checks the exit status, and calls "mail" if it fails. Probably about 6 or so
> lines of shell script.  May want to use a temp file instead of pipe so it's
> easier to check exit status of your commands independantly.
>
> Run the script from cron and voila. Might be good to add checks so you won't
> get 21356 emails when something starts failing.
>
> I wrote a comprehensive app in perl a few years ago for another company
> that checked a number metrics, logged performance numbers in a database, etc.
> It's not that difficult of a task for any good sysadmin.
>
>
>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug
>




More information about the svlug mailing list