I am in a need where i do have 2 Pools one of them is serving traffic while other is not.
The servers which is not serving traffic are also up & running, but just that not serving traffic ( due to iRule configured in a way).
Any API which can tell us this Pool or individual server is not serving traffic and its viceverse.
There are a few ways you can do that.
One would be to log into the BIG-IP GUI and navigate to Statistics > Module Statistics > Local Traffic, and on the top drop down menu that says "Status Summary" select "Pools". Down below it will display your pools and if you click the + symbol to the left of the pool you are interested in, it will show the connections to each individual member.
You can also run a tcpdump on the BIG-IP interface that faces your servers and filter the results using "dst host <server.ip.address.in.question>"
Hope that helps!
In fact you can check that your pool-member is used, using stat or capture traffic.
You can also use my Irule to see in real time what Pool-memeber is used:
let me know if you need to use this irule...