Http Host Tag Keepalive - Cisco 11503 - CSS Content Services Switch Administration Manual

Content services switch
Hide thumbs Also See for 11503 - CSS Content Services Switch:
Table of Contents

Advertisement

Chapter 8
Using the CSS Scripting Language

HTTP Host Tag Keepalive

OL-5647-02
! 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
!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"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Cisco Content Services Switch Administration Guide
Script Keepalive Examples
8-61

Advertisement

Table of Contents
loading

This manual is also suitable for:

11500 series

Table of Contents