Ad Widget

Collapse

Nginx Version in Zabbix Host Monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stevefxp
    Senior Member
    • Aug 2020
    • 168

    #1

    Nginx Version in Zabbix Host Monitoring

    Hello all,

    I have setup Zabbix to monitor one of my app servers, which is working pretty well. The only thing I cannot get to show in Zabbix is the Nginx version. I am getting the following:

    Preprocessing failed for: HTTP/1.1 200 OK..Connection: close..Content-Length: 100..Content-Type: text/plain..Date: Sat, 29 ...
    1. Failed: cannot perform regular expression "(?i)Server: nginx\/(.+(?<!\r))" match for value of type "none": pattern does not match


    When I SSH into the server I type nginx -v and get back the actual version. Why is Zabbix having difficulty getting the version when I can pretty simply.

    Thanks,
    Steve
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Does your Nginx server return the "Server: nginx" HTTP header with the version number?

    Markku

    Comment

    • stevefxp
      Senior Member
      • Aug 2020
      • 168

      #3
      It does not. I think they should change the way to pull the version. Like I said above...nginx -v will give the version, instead of the current method.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        You are free to submit a feature request ticket in Zabbix support portal if you feel the default template (that works fine with Nginx default settings) should be modified.

        However, if the Nginx server security is set so that it doesn't show the version header even to your own Zabbix server, I don't see how enabling SSH connectivity (to run "nginx -v" without Zabbix agent) from Zabbix server would be allowed.

        Markku
        Last edited by Markku; 30-06-2024, 11:53. Reason: Added note about Nginx by HTTP template not using Zabbix agent

        Comment

        • stevefxp
          Senior Member
          • Aug 2020
          • 168

          #5
          On the server in question I type in nginx -v and it comes back with the version, even when the version does not show in the header. This is not about security at all....all that is needed is to change how you get that information, regardless of the header situation.

          Comment

          Working...