Forum Discussion
Filtering Node
Hi,
If I have 100 pools and I know one server name but I don't the pool name.
I want to use grep cmd to see that node and associate pool.
How can I do it ?
tmsh list ltm pool | grep 'x.x.x.x' is That right ?
- Ed_Summers
Nimbostratus
You can do it visually by using the Network Map (in GUI: Local Traffic -> Network Map) and using the search function. However I suspect you want to do this from the CLI given that's where you started.
Several ways to do this depending on what the output will be used for. Given the method you've presented, all you'll receive back are the lines matching your 'grep search'...which may not be too useful as they'll only contain the pool member (no pool names). A couple of options:
Use 'one-line' to list the entire pool config on a single line. You'll get the pool configs for all pools that contain that member:
tmsh list ltm pool one-line | grep x.x.x.x
Taking this a step further, if you only want the pool names:
tmsh list ltm pool one-line | grep x.x.x.x | cut -d" " -f3
Have grep match on the first line of the pool config as well as the member you're interested in. This will return all lines including pool names, so you'll have to ignore any pool names that are not immediately followed by your node name:
tmsh list ltm pool | grep 'ltm\|x.x.x.x'
Probably much better ways to do it, but those will get you some initial results.
- Romani_2788Historic F5 Account
You could use the command above, but that will not give you the virtual server reference.
Why don't you list the virtual server configuration, since you know the name, and that way you see the pool that is associated with it? Such as:
tmsh list ltm virtual
Let us know if that will work.
- f51
Cumulonimbus
I am looking for pool and even I don't know thw virtual. But first I want to see pool. And now it is working with tmsh list ltm pool one-line | grep x.x.x.x | cut -d" " -f3
Thank you Romani
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com