Forum Discussion

adrianglendinning's avatar
Icon for Nimbostratus rankNimbostratus
Jul 04, 2024

F5 TCP Health Monitor Send/Receive strings


We need to create TCP health checks on an LTM device that checks the health of a VIP running on an LTMi device. I'm not sure how the send and receive strings should look. Wondering if anyone would have an example similar to this.



3 Replies

  • send string is simple text but receive string is in regular expression format.

    if youre not familiar with programming, i suggest you ask help from app developer team.
    just like the industry name suggest, i.e. application delivery controller, bigip is actually very application layer so it's normal that application team is involved in the configuration.

  • Hi Adrian,

    Are you trying to monitor a VIP on F5? Why not monitor the pool members instead?

    Check out this article below for crafting strings for tcp monitors.

    In addition, most of the time the default tcp profile works perfectly except you're expecting a particular echo response from the servers.

  • Hello Adrian,


    If its L7 vip, go with http or https monitoring instead of TCP. That will be more recommended that usual port monitoring. if its a L4 vip, use below steps. i have added http monitoring details Aswell(receive and send).  

    Steps to Create TCP Health Checks:
    Log in to the LTM Device:

    Access the LTM device through the command line or GUI.
    Create a New TCP Health Monitor:

    If using the GUI, navigate to Local Traffic > Monitors > Create.
    If using the command line, you can use the tmsh command.
    Configure the Monitor Settings:

    Name: Assign a name to the monitor (e.g., TCP_Health_Check).
    Type: Select TCP.
    Send and Receive Strings:
    The send and receive strings will depend on the specific application protocol running on the VIP. Here are some common examples:

    Example for HTTP VIP:
    Send String:

    GET / HTTP/1.1\r\nHost:\r\nConnection: close\r\n\r\n
    This sends an HTTP GET request to the server.

    Receive String:

    HTTP/1.1 200 OK
    This expects the server to respond with a 200 OK status.

    Example for a Simple TCP Echo Server:
    Send String:

    This sends a simple string HELLO to the server.

    Receive String:

    This expects the server to echo back the same string HELLO.

    Example Configuration in tmsh:
    Here’s how you might configure a TCP health monitor with tmsh:


    tmsh create ltm monitor tcp TCP_Health_Check send "GET / HTTP/1.1\r\nHost:\r\nConnection: close\r\n\r\n" recv "HTTP/1.1 200 OK"
    Applying the Monitor to a Pool:
    After creating the monitor, you need to assign it to the relevant pool:


    tmsh modify ltm pool my_pool monitors add { TCP_Health_Check }
    Verifying the Configuration:
    To ensure your monitor is working correctly, you can check the status:


    tmsh show ltm pool my_pool
    This will show the status of the pool members and whether they are marked up or down based on the health checks.