09-10-2001 08:14 AM
Hello
I am trying to figure out if this is possible. I want the CSS to check a web page for a specific word such as "ClientABC" any where in the page. If the word is found, then CSS will assume that page is working fine.
The reason for this is: we want to know if database does not send the output to the page, CSS should tell us that.
I found one script close to this but not sure if this will help me at all..
------------------------------------------
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-httptag
! Parameters: HostName WebPage HostTag
!
! Description:
! This script will connect to the remote host and do an HTTP
! GET method upon the web page that the user has asked for.
! This script also adds a host tag to the GET request.
!
! Failure Upon:
! 1. Not establishing a connection with the host.
! 2. Not receiving an HTTP status "200 OK"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if ${ARGS}[#] "NEQ" "3"
echo "Usage: ap-kal-httptag \Hostname WebPage HostTag\"
exit script 1
endbranch
! Defines:
set HostName "${ARGS}[1]"
set WebPage "${ARGS}[2]"
set HostTag "${ARGS}[3]"
! Connect to the remote Host
set EXIT_MSG "Connection Failure"
socket connect host ${HostName} port 80 tcp
! Send the GET request for the web page
set EXIT_MSG "Send: Failed"
socket send ${SOCKET} "GET ${WebPage} HTTP/1.0\nHost: ${HostTag}\n\n"
! Wait for a good status code
set EXIT_MSG "Waitfor: Failed"
socket waitfor ${SOCKET} "200 OK"
no set EXIT_MSG
socket disconnect ${SOCKET}
exit script 0
09-13-2001 01:23 PM
I see no way to set that up in the docs. You could ask Cisco or at least put in an enhancement request.
10-17-2001 05:45 PM
Hi there !
I am not sure about the current status of your investigation but I believe there are a number of ways to do what you want by just using the http keepalives / get statement.
I think that what you really want to do is to monitor the database connection and for this you can create a test page (asp) that connects to the backend db and returns either a 'success' or 'failed'.
The page contents only change on failure causing the CSS to pull that webserver out of the cluster.
Regards,
Leonel
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide