For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Karthik_Kumaran's avatar
Karthik_Kumaran
Icon for Nimbostratus rankNimbostratus
Aug 07, 2014

Perl script to enable/diable node from a pool

I have a Big-IP LTM running 11.4.1. i want one of my web server in a Pool be able to use a Perl script to talk to the LTM to enable/disable a node from the pool. i found this -> https://devcentral.f5.com/wiki/iControl.icontrol_proxy_doc.ashx -> which explains this when used with a Enterprise Manager setup to manage a group of BIG-IP devices. I just have one LTM and want the web server talk directly to the LTM with a Perl script to achive this. Is there a possible way to do this?

 

5 Replies

  • Hi Karthik, do u have ssh access to bigip from webserver ? If so can't we just run "ssh root@LTMip 'tmsh ltm node session user-disabled' to disable it & "ssh root@LTMip'tmsh ltm node session user-enabled' To make forced down "ssh root@LTMip'tmsh ltm node state user-down'" and user-up to make it up.

     

  • Yes Raj. The webserver can ssh to the F5. The problem is we want to avoid a manual intervention to have someone to login to the F5 to remove the memeber from the pool. We want to script it so the webserver interacts automatically to the F5 in a particular time to remove the members that it want out of load-balancing rotation.

     

  • I think the below link may help

     

    https://devcentral.f5.com/wiki/iControl.DisablingNodeServers.ashx

     

    But just on curiosity, why you need to disable a node automatically ?

     

  • We have to reload the servers at particular times in a week regularly to avoid the servers reaching a saturation point and going into a hung state. before we do that we want to take it out of the Pool so there are no new connections hitting it and once the connections become 0 we reload the server.

     

  • Another option would be to use the receive disable string in the health monitor. If the webserver can automatically change the healthcheck response at a scheduled time before it reboots, the LTM will automically stop sending new connections there until the regular receive string is received again.

     

    See http://support.f5.com/kb/en-us/solutions/public/12000/800/sol12818.html?sr=39689197