How can I reach pool member availability property by using rest API calling with member IP?
I discover that if I call with pool name I can reach member availability but I want to access this value without using pool name since in the query phase I will not have pool name.
There are guides on filtering using $select but I’ve yet to encounter one that filters subcollections. You can have a look at this article or check out the documentation for OData which F5 used for this API implementation (both linked inline in this sentence). I am not sure if they have full support for OData though so keep that in mind.
The call to the REST API above is very heavy so if you might want to avoid it if doing it often or to a device with many pools without using some kind of caching proxy.
In my case, I have one pool called P-WEB112_80 which has one member node with IP 10.100.40.112.
# tmsh list ltm pool P-WEB112_80
ltm pool P-WEB112_80 {
members {
N-WEB112:http {
address 10.100.40.112
session monitor-enabled
state down
}
}
monitor gateway_icmp
}
This solves what you are requesting, but take into account that if this member is applied to more than one pool, you will see in the output “up” “up” or “down” “down” without any information about the pool, so in this case, you could use something like this.
Dear Dario, thank you for your detailed answer. I have one more small question: I am trying to reach F5 IP from outside and in the curl command I am taking curl: (35) schannel: SNI or certificate check failed: SEC_E_WRONG_PRINCIPAL (0x80090322) error. I also tried with -s but that time nothing returned. Can you give me an idea about it?
Thank you, I dont want to bore you with my questions but I got error about IP:
jq: error: Invalid numeric literal at EOF at line 1, column 12 (while parsing ‘10.192.40.112’). I tried as you typed “10.192.40.112” and also in [] but doesn’t solved. Is my case not-quite-valid JSON?
Other point, before moving to a remote device, try to execute this lines in the BIG-IP. That will give a clue if this error appears everywhere or just in one specific device.
Finally, besides the error, it’s good to include which lines you are executing (pasting them here). This will give me more info about if this could be caused by a syntax error.