On Mon, 16 Apr 2001, William Kaufman wrote:
> You could also just add a line in you shell script or batch file to
> send email after tomcat has run.
>
> FWIW, I like your option (2): you can even detect catastrophic
> failures on the server, just by locating the program on another
> (theoretically "safer") machine.
>
> And, can I mention that I'm entertained that anyone still uses the
> word "abend"? ;-)
FWIW, I have something that takes a simple approach to this -- it
periodically (using sleep) does a number of checks to make sure tomcat
is running OK -- first, it checks that the tomcat process is running
at all (using ps, so this is a UNIX solution), and it also checks that
there are no OutOfMemoryError's in the appropriate log file. I have
it set up so that it emails me and/or restarts tomcat, if appropriate.
(And now, as I occasionally have some OutOfMemoryError problems, it
looks like I have some memory leak type problems, so I need to go over
my code and find the problems :-).
> > -----Original Message-----
> > From: Mark Mynsted [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 16, 2001 9:31 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Tomcat monitor/poller/email
> >
> >
> > Yes, that helps.
> >
> > Has anybody written one of these from scratch? What approach
> > did you take?
> > I am curious what approach folks have taken.
> >
> > If I write one myself I thought of the following options:
> > 1. Open a system semaphore at the start of Tomcat. Have an
> > email program sit on the semaphore. If Tomcat dies, and it's
> > semaphore dies (which it would/should) then send an email.
> > 2. Use a socket. Open a socket connection between a mail
> > program and Tomcat. If Tomcat breaks the connection, send email.
> > 3. Open an email thread as a hook into Tomcat's runtime via
> > Runtime.getRuntime().addShutdownHook(emailThread). But this
> > will not catch an abend, such as a native code failure.
> > 4. Other
> >
> > >>> [EMAIL PROTECTED] 4/13/2001 11:40:05 PM >>>
> >
> > Not free but very reasonable priced: http://www.ipsentry.com/
> >
> > If your server is open to the Intranet, we are using
> > www.netmechanics.com
> > for 10$
> > a month.
> >
> > Hope this helps.
> >
> > Tal
> >
> > > -----Original Message-----
> > > From: Mark Mynsted [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, April 13, 2001 3:08 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Tomcat monitor/poller/email
> > >
> > >
> > > Has anybody out there set anything up that will email them in the
> > > event the Tomcat would crash or not be running? (Or know of free
> > > software that can do that.) I am running Tomcat under Windows NT.
> > >
> > > If so please let me know. (I do not want to re-create the wheel.)
> > >
> > > I have NOT had trouble with Tomcat crashing, I simply need to do
> > > this for my SLA.
> > >
> >
>
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]