Ad Widget

Collapse

PHP-FPM: php-fpm_ping / wrong value / always down

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • janlange
    Junior Member
    • Jan 2021
    • 12

    #1

    PHP-FPM: php-fpm_ping / wrong value / always down

    Hello,

    need a little help (I'm new to zabbix).

    I have 2 linux hosts.. on one the checks works on the other not.

    Host 1:
    Ubuntu 20.04.1 LTS
    Zabbix-Agent2 5.2.3
    php7.4-fpm 7.4.3
    Nginx 1.18.0

    Host 2:
    Ubuntu 18.04.4 LTS
    Zabbix-Agent2 5.2.3
    php7.2-fpm 7.2.24
    apache2 2.4.29

    So on Host 1 it failes.. see manual tests:
    Code:
    # zabbix_agent2 -t web.page.get["localhost","/ping","80"]
    web.page.get[localhost,/ping,80] [s|HTTP/1.1 200 OK
    Connection: close
    Transfer-Encoding: chunked
    Cache-Control: no-cache, no-store, must-revalidate, max-age=0
    Content-Type: text/plain;charset=UTF-8
    Date: Sun, 10 Jan 2021 12:19:34 GMT
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Server: nginx/1.18.0 (Ubuntu)
    
    4
    pong
    0]
    Zabbix takes the "0" and means, service is down.

    But if I use curl directly, the answer is correct:
    Code:
    # curl localhost/ping
    pong
    On Host 2 it works:
    Code:
    # zabbix_agent2 -t web.page.get["localhost","/ping","80"]
    web.page.get[localhost,/ping,80] [s|HTTP/1.1 200 OK
    Connection: close
    Cache-Control: no-cache, no-store, must-revalidate, max-age=0
    Content-Type: text/plain
    Date: Sun, 10 Jan 2021 12:19:24 GMT
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Server: Apache/2.4.29 (Ubuntu)
    Vary: Accept-Encoding
    
    pong]
    And curl says the same:
    Code:
    # curl localhost/ping
    pong
    Last edited by janlange; 10-01-2021, 14:37.
  • janlange
    Junior Member
    • Jan 2021
    • 12

    #2
    I see on every page I get above a "checksum?" and at the end one zero.

    Look:
    Code:
    # zabbix_agent2 -t web.page.get["localhost","/","80"]
    web.page.get[localhost,/,80] [s|HTTP/1.1 200 OK
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: text/html
    Date: Sun, 10 Jan 2021 12:39:47 GMT
    Etag: W/"5e9efe7d-264"
    Last-Modified: Tue, 21 Apr 2020 14:09:01 GMT
    Server: nginx/1.18.0 (Ubuntu)
    
    [B]264[/B]
    <!DOCTYPE html>
    <html>
    <head>
    <title>Welcome to nginx!</title>
    <style>
    body {
    width: 35em;
    margin: 0 auto;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    }
    </style>
    </head>
    <body>
    <h1>Welcome to nginx!</h1>
    <p>If you see this page, the nginx web server is successfully installed and
    working. Further configuration is required.</p>
    
    <p>For online documentation and support please refer to
    <a href="http://nginx.org/">nginx.org</a>.<br/>
    Commercial support is available at
    <a href="http://nginx.com/">nginx.com</a>.</p>
    
    <p><em>Thank you for using nginx.</em></p>
    </body>
    </html>
    
    [B]0[/B]]
    Is this a problem with nginx?

    Comment

    • janlange
      Junior Member
      • Jan 2021
      • 12

      #3
      Have found the problem myself.

      In nginx for zabbix requests via web.page.get, I must tell nginx the parameter "chunked_transfer_encoding off", because zabbix cannot interpret it.

      Comment

      Working...