Forum Discussion
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
- nag_54823
Cirrostratus
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.
- Karthik_Kumaran
Nimbostratus
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.
- nag_54823
Cirrostratus
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 ?
- Karthik_Kumaran
Nimbostratus
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.
- mimlo_61970
Cumulonimbus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com