Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

List of Load Balancing Mode values for iControl Rest API Call

Sarath_Chandra
Nimbostratus
Nimbostratus

Hi,

My name is Sarath, we are working on Automating the F5 LTM Pool / Pool Members / Monitor Creation using F5 API Calls. I am trying to find the different Load Balancing Mode values available that can be passed to the api call. I am unable to find any documentation for it. The only document available is the API call Reference. Please provide a link to all the Load Balancing Mode values available. Really appreciate your help on this.

Link Available for API Ref: https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_ltm_pool.html

 

Thanks

Sarath Chandra

1 ACCEPTED SOLUTION

Satoshi_Toyosa1
F5 Employee
F5 Employee

You can find the list of load-balancing methods from tmsh help. Run the command below from your console:

# tmsh help ltm pool

The command yields

load-balancing-mode [
          dynamic-ratio-member | dynamic-ratio-node |
          fastest-app-response | fastest-node |
          least-connections-members |
          least-connections-node |
          least-sessions |
          observed-member | observed-node |
          predictive-member | predictive-node |
          ratio-least-connections-member |
          ratio-least-connections-node |
          ratio-member | ratio-node | ratio-session |
          round-robin | weighted-least-connections-member |
          weighted-least-connections-node]

You can get the same information from the Configuration Utility (GUI) too: Just click the Help tab.

0691T000005nKOLQA2.jpg

You can do the same with iControl REST, however, there is no direct iControl REST API for tmsh help, unfortunately. So, you need to call /mgmt/tm/util/bash to call tmsh to get a desired help (I know, it's awkward).

# curl -sku admin:<pass> https://<mgmtIP>/mgmt/tm/util/bash \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"command":"run", "utilCmdArgs":"-c \"tmsh help ltm pool\""}'

You may want to pipe the output to the following python one-liner for readability:

| python -c 'import sys,json; o=json.load(sys.stdin); print o["commandResult"]'

I hope this helps.

View solution in original post

2 REPLIES 2

Satoshi_Toyosa1
F5 Employee
F5 Employee

You can find the list of load-balancing methods from tmsh help. Run the command below from your console:

# tmsh help ltm pool

The command yields

load-balancing-mode [
          dynamic-ratio-member | dynamic-ratio-node |
          fastest-app-response | fastest-node |
          least-connections-members |
          least-connections-node |
          least-sessions |
          observed-member | observed-node |
          predictive-member | predictive-node |
          ratio-least-connections-member |
          ratio-least-connections-node |
          ratio-member | ratio-node | ratio-session |
          round-robin | weighted-least-connections-member |
          weighted-least-connections-node]

You can get the same information from the Configuration Utility (GUI) too: Just click the Help tab.

0691T000005nKOLQA2.jpg

You can do the same with iControl REST, however, there is no direct iControl REST API for tmsh help, unfortunately. So, you need to call /mgmt/tm/util/bash to call tmsh to get a desired help (I know, it's awkward).

# curl -sku admin:<pass> https://<mgmtIP>/mgmt/tm/util/bash \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"command":"run", "utilCmdArgs":"-c \"tmsh help ltm pool\""}'

You may want to pipe the output to the following python one-liner for readability:

| python -c 'import sys,json; o=json.load(sys.stdin); print o["commandResult"]'

I hope this helps.

Hi Satoshi,

Thank you so much for the quick response. This is really helpful.

 

Sarath Chandra