Forum Discussion

Juerg_Wiesmann's avatar
Juerg_Wiesmann
Icon for Nimbostratus rankNimbostratus
Jun 03, 2008

Disabling a Virtual

Dear All,

 

 

I try to disable a virtual Server on a LTM if less than 2 Poolmembers are available.

 

 

when CLIENT_ACCEPTED {

 

if {[active_members http_pool] < 2 } {

 

set vs_http disable

 

log local0. "vs_http is disabled" }

 

}

 

 

The log is filled with the sentence, but Virtual stays enabled.

 

 

Any help appreciated.

 

 

Regards

 

 

Wiesmann

1 Reply

  • When the condition is true, you're setting a variable. But this variable isn't used by LTM to do anything. If you want to reject the connection (send a TCP reset), you can replace 'set vs_http disable' with 'reject'. If you want to drop any further client side packets, you can use 'drop' instead. If you want to send an HTTP redirect, you can change the event from CLIENT_ACCEPTED to HTTP_REQUEST and then use HTTP::redirect "http://sitedown.example.com", instead of 'set vs_http disable'.

     

     

    Aaron