Forum Discussion

FTD_Routing_Hyd's avatar
FTD_Routing_Hyd
Icon for Nimbostratus rankNimbostratus
Dec 12, 2016

iControl setup on Linux/unix platforms

Dear members,need help with f5 incontrol rest api commands on linux platform

 

What is the command for checking the stringified pool member statistics? What is the command for enabling and disabling pool members/virtual servers? Also,I need help related to incontrol setup on linux/unix machines

 

Thanks

 

5 Replies

  • Can you clarify what you mean by "iControl"? iControl is an management/automation API that is on a F5 platform. There are associated client libraries for the iControl APIs that we have build in .Net, PowerShell, Java, and Python. If you want to create an iControl script on Linux, you will need to find a client library or toolkit that is supported on that platform. Perl will work on virtually any platform and there are a lot of samples on DevCentral calling our SOAP APIs via Perl. Java should work for you on Linux as well. While Powershell is now available cross-platform, the underlying .Net framework (portable version) code does not include the needed System.Web.Services classes to support SOAP API calls in the .Net library.

     

    Hope that helps...

     

    -Joe

     

  • Hi Pete,thanks for the reply.

     

    We edited the command in the script with the one you posted.Please find the attached screenshot. Still,one error observed.

     

     

    Also, I am posting the output

     

    ===================================================

     

    [xxxx@xxx ~]$ ./script

     

    Enter your options: disable or enable disable

     

    Enter the pool name pool_xxxxxxxxxx

     

    Enter the node name node_xxxxxxxxxx

     

    Enter port xxxxx

     

    ./script: line 13: {"kind":"tm:ltm:pool:members:membersstate","name":"node_xxxxxx:xxxxx","partition":"Common","fullPath":"/Common/node_xxxxxxx:xxxx","generation":5440,"selfLink":";:{"autopopulate":"disabled"},"inheritProfile":"enabled","logging":"disabled","monitor":"default","priorityGroup":0,"rateLimit":"disabled","ratio":1,"session":"user-disabled","state":"user-down"}: No such file or directory

     

    % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

     

    100 209 100 209 0 0 1953 0 --:--:-- --:--:-- --:--:- 34833

     

    ./script: line 15: {"code":400,"message":"Found: command not found

     

    =======================================================================================

     

    • PeteWhite's avatar
      PeteWhite
      Icon for Employee rankEmployee

      Remove the backticks - ` from lines 13 and 15. You may also want to use curl -s to stop the download text. Not sure whether you know but you can use $select to select which data you want returned. ie rather than returning all state and statistics information, you can just return the single state field. You then want to consider outputting only the correct information. This is rather tricky in bash, you may find it simpler to port the script to Python or similar. I have a Python module that makes it pretty simple to do this in Python : iCR Python Module for iControl REST