The published code had errors, but the idea of  getting a connection
(url.openConnection)and testing response code in header with
con.setRequestMethod("HEAD") and con.getResponseCode() should work like your
example of a JSP.

-----Original Message-----
From: Turner, John [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 2:46 PM
To: 'Tomcat Users List'
Subject: RE: Script for checking remote server



I don't think so...the last example I saw was making system calls to ps and
looking for a particular entry in the process table, and the other one I saw
was just checking to see if a response came back (a 404 or 500 or other
error is a valid response but not the one you want).  That doesn't do
anything.  Perhaps I missed another example that was posted.

John

> -----Original Message-----
> From: Ron Day [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 3:37 PM
> To: Tomcat Users List
> Subject: RE: Script for checking remote server
>
>
> I assume you are agreeing with me, and Hannes ?
>
> -----Original Message-----
> From: Turner, John [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 1:59 PM
> To: 'Tomcat Users List'
> Subject: RE: Script for checking remote server
>
>
>
> Monitoring the process table with ps doesn't tell you if your
> application is
> available.  It just tells you if the OS thinks your
> application (Tomcat) is
> running.
>
> To remotely monitor/test a web application, your monitor
> application must
> make a full HTTP/HTTPS request and check the content returned as the
> response for an indicator that all is well.  Anything else is false
> security.
>
> John
>
> > -----Original Message-----
> > From: Ron Day [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 25, 2003 2:07 PM
> > To: Tomcat Users List
> > Subject: RE: Script for checking remote server
> >
> >
> > Use java code very similar to that in the recent post by
> > Hannes Schmidt (see
> > Tues 02/25/2003:5.29AM)
> >
> > I run something like this out of a thread that I initiate in
> > the init method
> > of my main servlet. It can call a java class to send email or
> > whatever.
> >
> > ron
> >
> > -----Original Message-----
> > From: tomcat guy [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 25, 2003 1:06 PM
> > To: Tomcat Users List
> > Subject: Script for checking remote server
> >
> >
> > What does everyone use to check the status of a remote server?
> >
> > I am needing a script (or what have you) that will validate
> > that my Tomcat
> > server is up and running on timed intervals.  If the server
> > is down, I need
> > to post to a web page that sends either (or both) an email &
> > a msg to my
> > cell phone (think I have this part figured out).
> >
> > Anyone care to share some code?  Or offer some ideas?
> >
> > It would be very much appreciated!
> > Thanks,
> > Chris
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to