Forum Discussion

Zafer_101134's avatar
Zafer_101134
Icon for Nimbostratus rankNimbostratus
Jan 03, 2007

count request

hello

 

i have 3 web servers, and servers have virtual hosts like abc.com abcd.com vs..

 

 

i want count errors(500, 403...) on servers if 3 times cant access urls remove this server from pool then wait 1 hour then check urls, if it works then add the pool

 

 

can i do this?

 

 

regards

 

 

zafer

 

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Hi Zafer -

     

     

    You can do most of that, depending on what version you are running.

     

     

    This forum has lots of similar examples to work from. Search for "HTTP::status" and you'll find some examples tracking and reacting to iterative errors. You'll see that the tcl "clock" command is commonly used to track the passage of time for the purpose of responding to excessive error rates. If you are running LTM 9.2 or better, you can use "LB::down" to down the node conditionally. (The wiki has more info on the various commands as well.)

     

     

    Not sure about bringing up the node after an hour. Monitors would typically be relied upon to resurrect the node, but I'm not aware of a way to trigger a monitor from within an iRule. That part may need to be a manual process, or perhaps better suited to an iControl app that receives a trap when a node is loggged down by the iRule, then queues a job to check on the node an hour later...

     

     

    HTH

     

    /deb