Auto scaling nodes using the linode API/cli
This is my first post here!
We have a couple of linodes, and we are very happy with them.
We are looking into adding a load balancer in front of them, and being able to add an extra node in case of extra traffic coming to our websites. I know it is possible to do create or remove nodes using the API or the CLI, but I can't find any resource to be able to do that automatically.
Here is a list of things I can't find yet:
How to get system usage (cpu, memory) of a linode using the API/CLI?
How to configure private IP address using a linode? (this will be needed to connect it to the noad balancer)
How to get the node balancer status if we go over the concurrency limit (unlikely, but we never know)?
Unfortunately you can't get the CPU and Memory usage from our APIs, but you should be able to set up your own code to read that from your server, which would also be more reliable (reading from your server directly, instead of reading from our stats boxes that read from your server, takes one step and potential point of failure out of the procedure).
You can get the Private IP of a Linode through the API when you add one, which is found here:
There is also no way to grab your current connections from the NodeBalancer API. I would suggest setting up a script that checks to see if all aspects are still up and running every x minutes/seconds, and you can use the API to programmatically list out your NodeBalancers and connected Nodes to check each one.
Unfortunately you can't get the CPU and Memory usage from our APIs.
Is there a reason this information isn't included in the API in something like the linode.list action? Historical data would be cool but I could live with instantaneous.