script writing for keepalive for CSS11506

Unanswered Question
Jan 31st, 2008
User Badges:

Hi,


I need write a script for health check:

1. a tcp port

2. the backend server will send a banner which include "END".


I have changed a little about ap-kal-tcp-ports (an example in css docs)


function SOCKET_CONNECT begin

set CONTINUE_ON_ERROR "1"

socket connect host ${SERVICE} port ${TCP-PORT} tcp 2000

socket waitfor ${SOCKET} "end" case-sensitive

set SOCKET-STAT "${STATUS}"

set CONTINUE_ON_ERROR "0"

socket disconnect ${SOCKET} graceful

function SOCKET_CONNECT return "${SOCKET-STAT}"

function SOCKET_CONNECT end


service test

ip address 10.1.1.21

protocol tcp

port 2304

keepalive type script ap-kal-tcp-ports-jx "10.1.1.21 2304"

keepalive frequency 20

active


it is working for health check, but, it is not care if there is a "end" existed or not.


Could anyone advice me how can I check a string in keepalive responce from backend server?


Any comments will be appreciated


Thanks in advance


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.

Actions

This Discussion