HTTP / HTTPS syntax Monitor check from CLI

Problem this snippet solves:

When creating monitor, we usually check web site availability with curl.

These commands allow to check if HTTP Monitor send string is correct

How to use this snippet:

from F5 cli (not tmsh) run following commands

Monitor HTTP:

SEND_STRING='Monitor String'
(echo -ne $SEND_STRING; cat) | nc 'Pool Member IP' 'Pool member port'

Monitor HTTPS:

SEND_STRING='Monitor String'
(echo -ne $SEND_STRING; cat) | openssl s_client -host 'Pool Member IP' -port 'Pool member port' -quiet


SEND_STRING='GET / HTTP/1.1\r\nHost:\r\nConnection: Close\r\n\r\n'
(echo -ne $SEND_STRING; cat) | nc 80

SEND_STRING='GET / HTTP/1.1\r\nHost:\r\nConnection: Close\r\n\r\n'
(echo -ne $SEND_STRING; cat) | openssl s_client -host -port 443 -quiet

Code :

No file

Tested this on version:

Updated Jun 06, 2023
Version 2.0

Was this article helpful?


  • I tried running this on 12.1.1, but it did not do anything. Please suggest.


  • (echo -ne "monitor string"; cat) | nc a.b.c.d xyz


    a.b.c.d being the ip address of the pool member xyz being the pool member port


  • Ajit's avatar
    Icon for Altostratus rankAltostratus

    Hello Stanislas,

    I tried the below command but it just shows me SSL errors. Can you assist?

    (echo -ne "GET / HTTP/1.1\\r\\nHost:\\r\\nConnection: Close\\r\\n"; cat) | openssl s_client -connect -quiet

    47753692343424:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1293:SSL alert number 40 47753692343424:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:184:

    It shows me the above errors after being connected.

    Note: I do not have a DNS entry for in place



  • Why did you add 2 \ in send string ? did you get it from tmsh which add a second \ in config file?

    try this:

    (echo -ne "GET / HTTP/1.1\r\nHost:\r\nConnection: Close\r\n"; cat) | openssl s_client -connect -quiet
  • Ajit's avatar
    Icon for Altostratus rankAltostratus

    Same result. I have client MA enabled on What should I do to get past that? Does that matter?






  • How can I use this command with NTLM authentication? The monitor works in the gui when credentials are specified but I get access denied from CLI.






  • Joey's avatar
    Icon for Nimbostratus rankNimbostratus

    Is there partition/route domain involved?

    if so, simply add ‘rdexec zzz’ before openssl where zzz stands for route domain ID