Forum Discussion

Ravi_Rajan_7549's avatar
Ravi_Rajan_7549
Icon for Nimbostratus rankNimbostratus
Jan 03, 2006

Decision based on Monitor Response

Hi,

 

 

I need to take a decision (for ex. taking a node gracefully down) based on the response of MSSQL monitor.(In the monitor, i am querying a database for a return string, this string can be of two types), and hence i want to take a decision based on the string value returned. Is this possible and can i get some sample code for this ?

 

 

TIA,

 

 

 

  • Can you be a bit more specific on what you are requesting.

     

     

    Do you already have a health monitor that you are using and are asking whether you can gracefully take down that node? If so, that's fairly simple with iControl. You can disable new sessions on the node and monitor the current sessions until it reaches zero. When that happens, you simply disable the node. Check out the PoolMember interface for the relevant methods.

     

     

    If you are asking about whether an existing monitor will do this for you, I believe that if our built-in monitors report an error, they forcefully down the server to disallow all connections. For questions about how the existing monitors work, you'll need to contact F5 Product Technical Support.

     

     

    -Joe
  • Thanks for the reply,

     

     

    Basically i want to use the MSSQL Monitor to monitor on of my servers. I am using a Database Query and return string to check the health. Based on the return strings, we want to do some actions -

     

     

    If return string is xyz - Action - Disallow any new connections and monitor the node for current active connections till it goes to zero. Once it reaches zero, take the node offline.
  • I'm still not seeing how this is an iControl question. If you have questions about Health Monitors, then you'll have to get in touch with F5 Product Technical Support.

     

     

    DevCentral is setup to support iControl (management api) and iRules development related questions.

     

     

    If your question was: "How do I write some iControl code to gracefully disable servers?" then I could give you some pseudo-code, but I don't think that's what you are after.

     

     

    -Joe
  • Hi Joe,

     

     

    Basically i want take some specific action on the response of the MSSQL Monitor. (By default on failure of monitor, it disables the node) I don't see an option to modify this behaviour.

     

     

    Hence, irule/icontrol may be an option. Need your views on this.

     

     

    Thanks,