Forum Discussion
6 Replies
Hi, Charles,
I'm not sure what language you want to use to query the F5 iControl, but I've put together a PowerShell module for checking the status of VIPs and pools, as well as getting session counts of pool members.
The trickiest part about using the iControl API is creating the session object you need to query and manipulate the F5. If you want to try that, and run into any issues with it, please let me know and I'll be happy to help.
Also, this page has some examples of how to use curl to query your F5 device.
Hope this helps. There's a bit of a learning curve when you first start, but once you're over that, you'll find you can to a lot of cool stuff programmatically.
-Joel
- Charles_WeltonNimbostratusThanks, Joel! The plan was to use Powershell, so your module will definitely come in handy! So, when you say "getting session counts of pool members", I guess that is the same thing as "getting active session counts of real hosts"? My guess is that is true, but wanted to confirm. What is the best way to contact you (without being a complete pest) if I have any questions about using your module?
- Hi, Charles, I'm not familiar with the terminology "real hosts." The only thing I'm aware of that has a connection count are the connections to a member (server) in any given pool. The best way to get in touch with me is at jnewton@springcm.com. Cheers, Joel
- samstep_81205Nimbostratus
Yes, you can, there are plenty of examples on DevCentral. Exact code would depend on whether you want to use iControl SOAP API or REST API and a specific programming language.
Here is a link to a code example in Python using REST API:
https://devcentral.f5.com/codeshare/connection-list-via-icontrolrest-api
iControl REST Documentation is here:
https://devcentral.f5.com/wiki/icontrolrest.homepage.ashx
iControl REST API User Guide in PDF can be downloaded here: https://devcentral.f5.com/d/the-user-guide-for-the-icontrol-rest-interface-in-big-ip-version-1160?download=true&vid=157:
Hope this helps,
Sam
- Charles_WeltonNimbostratusThanks, Sam! The information you have provided will be very valuable.
- samstepCirrocumulus
Yes, you can, there are plenty of examples on DevCentral. Exact code would depend on whether you want to use iControl SOAP API or REST API and a specific programming language.
Here is a link to a code example in Python using REST API:
https://devcentral.f5.com/codeshare/connection-list-via-icontrolrest-api
iControl REST Documentation is here:
https://devcentral.f5.com/wiki/icontrolrest.homepage.ashx
iControl REST API User Guide in PDF can be downloaded here: https://devcentral.f5.com/d/the-user-guide-for-the-icontrol-rest-interface-in-big-ip-version-1160?download=true&vid=157:
Hope this helps,
Sam