SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
How to flag good/bad webserver response?

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
How to flag good/bad webserver response?
Author Message
Ryan Pieszak



Joined: 19 Jun 2003
Posts: 25

Post How to flag good/bad webserver response? Reply with quote

Greetings,
I'm building a little script to monitor a cluster of webservers. I need to check to see if the webserver responds with the proper http status code (200). Can WebGetFile() or WebGetPageHTML() provide this return code?
Thanks,
Ryan

Fri May 21, 2004 2:22 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: How to flag good/bad webserver response? Reply with quote

I think you can use WebGetFile()to get the response as a regular html page and then analyze to contents of the obtained page for error messages.

Also, have you checked PingPort command? It can be used to monitor web server response times (port 80 for http).

: Greetings,
: I'm building a little script to monitor a cluster of webservers. I need to
: check to see if the webserver responds with the proper http status code
: (200). Can WebGetFile() or WebGetPageHTML() provide this return code?
: Thanks,
: Ryan

Fri May 21, 2004 2:35 pm View user's profile Send private message
Ryan Pieszak



Joined: 19 Jun 2003
Posts: 25

Post Re: How to flag good/bad webserver response? Reply with quote

As a follow-up question, if I had to rely on an error being triggered, how would I trap for that error and continue the script? Thanks.

: Greetings,
: I'm building a little script to monitor a cluster of webservers. I need to
: check to see if the webserver responds with the proper http status code
: (200). Can WebGetFile() or WebGetPageHTML() provide this return code?
: Thanks,
: Ryan

Fri May 21, 2004 2:35 pm View user's profile Send private message
Ryan Pieszak



Joined: 19 Jun 2003
Posts: 25

Post Re: How to flag good/bad webserver response? Reply with quote

Okay, two questions...

1) If I were to using PingPort (80), that would tell me if the internal webserver if functional? It wouldn't, however, tell me if the Cold Fusion server on each webserver is functional.

2) If I were to use WebGetFile(), there would be two "problems" to watch for. The first is if it can hit the page, but the page has an error on it. This problem would be caught by pulling in the source code and searching for an error. The other problem is if the webserver isn't serving. If this is the case, WebGetFile() wouldn't connect, and it would throw an error. How could I catch for this error?

Thanks.

: I think you can use WebGetFile()to get the response as a regular html page
: and then analyze to contents of the obtained page for error messages.

: Also, have you checked PingPort command? It can be used to monitor web server
: response times (port 80 for http).

Fri May 21, 2004 2:47 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: How to flag good/bad webserver response? Reply with quote

Use OnErrorResumeNext and then check for the file. Make sure you delete this file before checking. If the file isn ot there. then you have an error condition. If it is there then you search it for errors.

Another suggestion, FileSearchEx can be used to seach multiple or individual files for specific text.

: Okay, two questions...

: 1) If I were to using PingPort (80), that would tell me if the internal
: webserver if functional? It wouldn't, however, tell me if the Cold Fusion
: server on each webserver is functional.

: 2) If I were to use WebGetFile(), there would be two "problems" to
: watch for. The first is if it can hit the page, but the page has an error
: on it. This problem would be caught by pulling in the source code and
: searching for an error. The other problem is if the webserver isn't
: serving. If this is the case, WebGetFile() wouldn't connect, and it would
: throw an error. How could I catch for this error?

: Thanks.

Fri May 21, 2004 5:43 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: How to flag good/bad webserver response? Reply with quote

Take a look at OnError... commands and also at GetLastError.

: As a follow-up question, if I had to rely on an error being triggered, how
: would I trap for that error and continue the script? Thanks.

Fri May 21, 2004 5:44 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.