Forum Discussion

Hoang_Hung's avatar
Jul 14, 2022

Monitor Layer 7

Dear all

I have a backend use web service port 8010. After I have using monitoring layer 7 but it not working.

I have tried curl-v https://abc:8010/swagger/index.html

Response: 

> GET /swagger/index.html HTTP/1.1
> Host: abc:8010
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.20.1
< Content-Type: text/html;charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: ; path=/; Httponly; Secure
<
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">

My monitor on F5: Type: http

Send string: GET /swagger/index.html

Receive string: 200  (but not working and after I tried Receive string: OK\r\n$ still not working)

Plz expain help me.

Thanks

Hoang Hung

  • Please try a Send-string of (and make sure to replace the hostname of abc with the hostname you were actually using in your cURL request):

    GET /swagger/index.html HTTP/1.1\r\nHost: abc:8010\r\nUser-Agent: curl/7.79.1\r\nAccept: */*\r\n\r\n

    ... and a Receive-string of (accepting status codes of 200 or 301 or 301). This string is handled as a non case-sensitive regular expression:

    ^HTTP/1\.[01]\s+(200|301|302)

     It will look for a response using HTTP/1.0 or HTTP/1.1 followed by at least one whitespace character (\s+) followed by one of the acceptable status code.

    If you are absolutely sure there will be a HTTP/1.1 200 OK in the response, you can put it in as well. The dot (.) in "HTTP/1.1" is handled as a wildcard (it is still treated as a regexp), but this shouldn´t matter.

    Keep in mind, that some webservers don´t reply with a reason phrase (here it is the OK; might be MOVED PERMANENTLY, FOUND etc.). That´s why it is now best practice not to include it in your receive string.