How to show only offline pool members on LTM via CLI

Is there a way in the CLI to show only the pool members that are currently down due to a health monitor? If I do a show ltm pool members I’ll get output like this (along with a ton more).

| Ltm::Pool Member: SERVER1_1.1.1.1:11111

| Status

| Availability : offline

| State : enabled

| Reason : Pool member has been marked down by a monitor | Monitor : /Common/tcp (pool monitor) | Monitor Status : down

| Session Status : enabled

| Pool Name : Pool_blah:11111 | IP Address : 1.1.1.1

If I did a show ltm pool members | grep Ltm::Pool|down I’ll get every line that contains that data when all I really want is:

Ltm::Pool Member: SERVER1_1.1.1.1:11111 Monitor Status : down Ltm::Pool Member: SERVER2_2.2.2.2:22222 Monitor Status : down Ltm::Pool Member: SERVER3_3.3.3.3:33333 Monitor Status : down

Here is what we’re running:

Sys::Version Main Package Product BIG-IP Version 11.5.4 Build 1.0.286 Edition Hotfix HF1 Platform Name BIG-IP vCMP Guest

mnovajov,

You can play around with grep. something like this may be what you’re after:

tmsh show ltm pool all members field-fmt |grep "ltm\ pool\|addr\|status.availability-state"

If not then run

tmsh show ltm pool all members field-fmt

and build up your query based on the output.

Hope this helps you on your way

N