For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Nizar's avatar
Nizar
Icon for Altostratus rankAltostratus
Jun 16, 2025
Solved

CLI Command to Identify Virtual Servers Using L4 vs L7 Monitors

Hi Everyone, I would like to ask if there is a CLI command to show on my BIG-IP device to grep the following: 1. Which virtual servers are still using pool with Layer 4 health monitors (e.g., tcp-h...
  • VGF5's avatar
    Jun 16, 2025

    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