Forum Discussion

Jefrao_46910's avatar
Jefrao_46910
Icon for Nimbostratus rankNimbostratus
Nov 27, 2009

Convert script Alteon to BIGIP sintax (irules)

Hi Guys,

 

 

I´m in process of replacing all infrastructure of load balancing of Alteon (3408) to BIG-IP (Viprion).

 

 

In many cases was necessary developed simples scripts (Alteon) to open port the 80, send a request and wait by a response "code/string". (I replaced the normal health (http/https...) by these type of scripts). Example bellow:

 

 

/c/slb/adv/script 4

 

open "80"

 

send "GET /loadbalance.txt HTTP/1.1\\nhost:player.xxxx.xxxx.xxx.xx\\n\\n"

 

expect "poa"

 

close

 

 

I have same types of scripts that must have be converted to the BIGIP sintax.

 

 

Somebody can help me with the translation of script above?

 

 

Thanks !

3 Replies

  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi,

     

     

    That looks like an HTTP monitor. You can configure something very similar by creating a new custom HTTP monitor. Set the send string to:

     

     

    GET /loadbalance.txt HTTP/1.1\r\nHost: player.xxxx.xxxx.xxx.xx\r\nConnection: close

     

     

    In 9.4 and higher, the monitoring daemon, bigd, will automatically append two CRLF's to the end of the send string. So you can leave them off.

     

     

    The receive string would be:

     

     

    poa

     

     

    Aaron
  • Hi hoolio

     

     

    My problem wa solved.

     

     

    bp>monitor player_test_ list

     

    monitor test {

     

    defaults from http

     

    recv "poa"

     

    send "GET /loadbalance.txt HTTP/1.1\r\nhost:xxx.xxx.xxxx.xxxx.xx\r\n\r\n"

     

     

    Tip: Change the sitax \\n\\n by "\r\n\r\n".

     

     

    Thank you very much ! :-)
  • As Aaron had mentioned it's a good idea to have the following "Connection: close" in your send string otherwise you might have some open connection.

     

     

    Bhattman