Cisco 11503 Administration Guide - Page 329
HTTP Host Tag Keepalive
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 329 highlights
Chapter 8 Using the CSS Scripting Language Script Keepalive Examples ! Defines: set HostName "${ARGS}[1]" set nProtocol "tcp" ! See if the user has specified a protocol if ${ARGS}[#] "==" "2" ! The user specified a protocol, so reset the value set nProtocol "${ARGS}[2]" endbranch set EXIT_MSG "Connection Failed" ! Connect to the remote host (use default timeout) socket connect host ${HostName} port 7 ${nProtocol} set EXIT_MSG "Send: Failed" ! Send the text to echo... socket send ${SOCKET} "Hello Cisco!\n" set EXIT_MSG "Waitfor: Failed" ! Wait for the reply from the echo (should be the same) socket waitfor ${SOCKET} "Hello Cisco!" 200 ! We've successfully logged in, the server is up and going. ! The job was done successfully. socket disconnect ${SOCKET} no set EXIT_MSG exit script 0 HTTP Host Tag Keepalive !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 OL-5647-02 Cisco Content Services Switch Administration Guide 8-61