I wrote this script a while back, and just came back around to putting it online so other folks could use it.
My most common task using the node balancers is temporarily enabling/disabling nodes; e.g. pull server 1 completely out of rotation, on all ports, while I'm doing maintenance.
Suppose you have 2 servers (called server1 and server2 in the Linode Manager) as members of a NodeBalancer, and each of them is listening on ports 80 and 443. When you want to do maintenance on server1, it's quite a lot of clicks in the Linode Manager to accomplish this.
So using this tool, you can do
Code:
loadbalancer server1 reject
This will take server1 completely out of rotation in the NodeBalancer, on all ports it is listening on. To bring it back online, use
Code:
loadbalancer server1 accept
Which will bring it back.
The code is at
https://github.com/greinacker/linode_loadbalancer - feel free to contribute if you want to add anything!