Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22555

NGINX by HTTP template cannot parse version in regex

XMLWordPrintable

    • 1

      Steps to reproduce:
      Use Ubuntu 22.04.2 with distro Nginx 1.18.0:

      curl -L https://127.0.0.1:8443/nginx_status -k -v
      ...
      < HTTP/2 200 
      < server: nginx/1.18.0 (Ubuntu)
      < date: Mon, 20 Mar 2023 10:12:39 GMT
      < content-type: text/plain
      < content-length: 101
      ...
      Active connections: 2 
      server accepts handled requests
       43 43 273 
      Reading: 0 Writing: 1 Waiting: 1 
      ...
      

      Regexp used in the template:

      Server: nginx\/(.+(?<!\r))
      

      Result:

      Preprocessing failed for: HTTP/2 200 ..server: nginx/1.18.0 (Ubuntu)..date: Mon, 20 Mar 2023 10:14:45 GMT..content-type: te...
      1. Failed: cannot perform regular expression "Server: nginx\/(.+(?<!\r))" match for value of type "string": pattern does not match
      

      Expected:
      Regular expression can parse both cases.

            drasikhov Denis Rasikhov
            edgar.akhmetshin Edgar Akhmetshin
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: