Ad Widget

Collapse

Web monitoring starts returning: Unrecognized content encoding type...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vanedu
    Junior Member
    • Aug 2023
    • 7

    #1

    Web monitoring starts returning: Unrecognized content encoding type...

    Hi,

    we use web monitor to monitor one external site. Its a simple monitoring, just checkint the return code. Unfortunelly its starts to return this error:

    "Unrecognized content encoding type. libcurl understands deflate, gzip, br, zstd content encodings."

    The site that is beeing monitored is external to our company, so we have no control over it. The monitoring worked before, but now stopped.

    The problem seems to be related to this problem:



    Tried to set Headers to "Accept-Encoding: *" but it not worked.

    Any ideias what the problem is?

    Zabbix version 6.0.21

    Click image for larger version

Name:	image.png
Views:	592
Size:	24.2 KB
ID:	469606

    Click image for larger version

Name:	image.png
Views:	601
Size:	32.6 KB
ID:	469604

    Click image for larger version

Name:	image.png
Views:	583
Size:	54.4 KB
ID:	469605​​​
    Attached Files
  • vanedu
    Junior Member
    • Aug 2023
    • 7

    #2
    Guys,

    I'm still having this problem when testing an external URL. To facilitate the tests, I tried to create a Script type item.

    Click image for larger version

Name:	image.png
Views:	679
Size:	34.3 KB
ID:	469742

    This is the JavaScript I'm using for testing. As you can see in the commented lines, I've already tried to add some Headers but there's no way to make it works.

    Code:
    var req = new HttpRequest();
    //req.addHeader('Accept: */*');
    //req.addHeader('Accept: text/plain');
    //req.addHeader('Content-Type: text/plain');
    //req.addHeader('Accept-Encoding: *');
    req.get("https://problematic_url");
    return req.getStatus();​
    When using the button to test the item, it always gives this error.

    Click image for larger version

Name:	image.png
Views:	587
Size:	28.6 KB
ID:	469743

    It only occurs with that specific URL. If I test it via curl on the command line, I can connect normally.

    Code:
    curl -vs https://problematic_url
    
    * Trying xx.xx.xx.xx:443...
    * TCP_NODELAY set
    * Connected to xxx.xxx.xx.xx (xx.xx.xx.xx) port 443 (#0)
    * ALPN, offering h2
    * ALPN, offering http/1.1
    * successfully set certificate verify locations:
    * CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
    } [5 bytes data]
    * TLSv1.3 (OUT), TLS handshake, Client hello (1):
    } [512 bytes data]
    * TLSv1.3 (IN), TLS handshake, Server hello (2):
    { [122 bytes data]
    * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
    { [25 bytes data]
    * TLSv1.3 (IN), TLS handshake, Certificate (11):
    { [5256 bytes data]
    * TLSv1.3 (IN), TLS handshake, CERT verify (15):
    { [264 bytes data]
    * TLSv1.3 (IN), TLS handshake, Finished (20):
    { [52 bytes data]
    * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
    } [1 bytes data]
    * TLSv1.3 (OUT), TLS handshake, Finished (20):
    } [52 bytes data]
    * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
    * ALPN, server accepted to use http/1.1
    * Server certificate:
    * subject: CN=xxxx.xxxx.xx.xx
    * start date: Aug 20 01:37:09 2023 GMT
    * expire date: Nov 18 01:37:08 2023 GMT
    * subjectAltName: host "xxxx.xxxx.xx.xx" matched cert's "xxxx.xxxx.xx.xx"
    * issuer: C=US; O=Let's Encrypt; CN=R3
    * SSL certificate verify ok.
    } [5 bytes data]
    > GET / HTTP/1.1
    > Host: xxx.xxxx.xx.xx
    > User-Agent: curl/7.68.0
    > Accept: */*
    >
    { [5 bytes data]
    * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
    { [297 bytes data]
    * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
    { [297 bytes data]
    * old SSL session ID is stale, removing
    { [5 bytes data]
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Date: Thu, 31 Aug 2023 16:46:53 GMT
    < Server: Apache/2.4.41 (Ubuntu)
    < Set-Cookie: PHPSESSID=xxxxxxxx; expires=Fri, 01-Sep-2023 04:46:53 GMT; Max-Age=43200; path=/
    < Expires: Thu, 19 Nov 1981 08:52:00 GMT
    < Cache-Control: no-store, no-cache, must-revalidate
    < Pragma: no-cache
    < Content-Encoding: ISO-8859-1
    < Set-Cookie: PHPSESSID=xxxxxxx; expires=Fri, 01-Sep-2023 04:46:53 GMT; Max-Age=43200; path=/
    < Transfer-Encoding: chunked
    < Content-Type: text/html; charset=ISO-8859-1


    ​Does anyone have any idea what it could be? Maybe some header I can add to the JavaScript to test something else? This is driving me crazy!

    Thanks.​

    Last edited by vanedu; 01-09-2023, 13:27.

    Comment

    • mma
      Member
      • Apr 2010
      • 39

      #3
      Hello,

      Your content-encoding header response is not allowed : https://developer.mozilla.org/en-US/...ntent-Encoding
      I've got the same issue with my CTA interface...

      Comment

      • vanedu
        Junior Member
        • Aug 2023
        • 7

        #4
        Hello,

        I ended up giving up using the Zabbix web monitor. To monitor the problematic website I created a script that uses Curl to connect to the website.​​

        Comment

        Working...