Forum Discussion

Sarath_Chandra's avatar
Sarath_Chandra
Icon for Nimbostratus rankNimbostratus
Oct 23, 2019

List of Load Balancing Mode values for iControl Rest API Call

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

  • 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.

    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.

  • 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.

    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.

    • Sarath_Chandra's avatar
      Sarath_Chandra
      Icon for Nimbostratus rankNimbostratus

      Hi Satoshi,

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

       

      Sarath Chandra