Forum Discussion
CLI Command to Identify Virtual Servers Using L4 vs L7 Monitors
- Jun 16, 2025
Hi Nizar
Here is the script. I have tested and worked as expected :-)
#!/bin/bashecho "=== Virtual Servers using L4 Monitored Pools (tcp, tcp-half-open) ===" for pool in $(tmsh list ltm pool one-line | grep -E 'monitor (tcp|tcp-half-open)' | awk '{print $3}'); do tmsh list ltm virtual one-line | grep "pool $pool" | awk -v p="$pool" '{print "Pool: " p " --> Virtual: " $3}' done
echo
echo "=== Virtual Servers using L7 Monitored Pools (http, https) ===" for pool in $(tmsh list ltm pool one-line | grep -E 'monitor (http|https)' | awk '{print $3}'); do tmsh list ltm virtual one-line | grep "pool $pool" | awk -v p="$pool" '{print "Pool: " p " --> Virtual: " $3}' done
Hi Nizar
Here is the script. I have tested and worked as expected :-)
#!/bin/bash
echo "=== Virtual Servers using L4 Monitored Pools (tcp, tcp-half-open) ===" for pool in $(tmsh list ltm pool one-line | grep -E 'monitor (tcp|tcp-half-open)' | awk '{print $3}'); do tmsh list ltm virtual one-line | grep "pool $pool" | awk -v p="$pool" '{print "Pool: " p " --> Virtual: " $3}' done
echo
echo "=== Virtual Servers using L7 Monitored Pools (http, https) ===" for pool in $(tmsh list ltm pool one-line | grep -E 'monitor (http|https)' | awk '{print $3}'); do tmsh list ltm virtual one-line | grep "pool $pool" | awk -v p="$pool" '{print "Pool: " p " --> Virtual: " $3}' done
- NizarJun 16, 2025
Altostratus
Hi VGF5 ,
Thank you very much for your help, I’ve tested the script and it works perfectly!
If possible, could you also help me with a similar script for GTM?
I’d like to check which Wide IPs are using Layer 4 and Layer 7 monitors on their associated pools.I would really appreciate your assistance on this as well.
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