Ad Widget

Collapse

Nginx: Failed to fetch stub status page (or no data for 30m)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabboox
    Junior Member
    • Jul 2020
    • 2

    #1

    Nginx: Failed to fetch stub status page (or no data for 30m)

    Ive defined an agent where its taking from nginx, and everything seems to be fine but the nginx data does not seem to come to zabbix server.
    the error shown is
    Nginx: Failed to fetch stub status page (or no data for 30m)
    I have done a apache basic auth on nginx root page so that I dont want anyone to see the pages, could this be the reason, if yes, how can I add the user and pass for apache basic auth inside the zabbix template?
    any suggestion?
  • zabboox
    Junior Member
    • Jul 2020
    • 2

    #2
    anyone there??

    Comment

    • max.ch.88
      Senior Member
      • Oct 2018
      • 206

      #3
      Originally posted by zabboox
      anyone there??
      Hi! "Template App Nginx by Zabbix agent" doesn't use authentication.
      In "Template App Nginx by HTTP" you could change the HTTP authentication field in the "Nginx: Get stub status page" item.

      Comment

      • ripperSK
        Member
        • Jul 2019
        • 42

        #4
        I don't know about default templates but any item with type HTTP check should support basic auth with username and password.

        you can read more about HTTP checks here https://www.zabbix.com/documentation...itemtypes/http

        Comment

        • stevefxp
          Senior Member
          • Aug 2020
          • 168

          #5
          Can I add to this...I am getting the same message in Zabbix, yet when I curl for the status I get a response. Am I missing something in Zabbix?

          In Zabbix I am also seeing this in the data for the host: Preprocessing failed for: HTTP/1.1 404 Not Found..Connection: close..Content-Length: 146..Content-Type: text/html..Date: We...
          1. Failed: cannot perform regular expression "server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)" match for value of type "none": pattern does not match

          Is this bc Nginx is only responding on 443? If that were the case I would believe my curl would fail?


          Click image for larger version  Name:	Screenshot 2024-05-29 132626.png Views:	0 Size:	35.2 KB ID:	484595
          Last edited by stevefxp; 29-05-2024, 19:30.

          Comment

          • stevefxp
            Senior Member
            • Aug 2020
            • 168

            #6
            OK a bit more information....I use Zabbix proxy to get back to my Zabbix server. What I did was edit nginx.conf and added the following:

            server {

            location /nginx_status {
            stub_status;
            allow 192.168.2.102; # Zabbix Server
            allow 10.0.3.1; # Zabbix Proxy for RICS Prod
            deny all; #deny all other hosts
            }
            }

            Would this be correct?

            Comment

            Working...