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

HAProxy template not parsing version (in case of debian packaged HAproxy)

XMLWordPrintable

    • Icon: Patch request Patch request
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 4.4.8rc1, 5.0.0beta2, 5.0 (plan)
    • 4.4.7, 5.0.0alpha4
    • Templates (T)
    • None
    • Zabbix 4.4.7
      HAProxy version 2.0.13-2~bpo10+1
    • Team INT
    • Sprint 63 (Apr 2020)
    • 0.125

      Steps to reproduce:

      1. Install zabbix Haproxy from Debian official packages (or backports)
      2. Activate template HAproxy by zabbix-agent (https://www.zabbix.com/integrations/haproxy).

      Result:

      The version is not correctly parsed:

      Preprocessing failed for: HTTP/1.1 200 OK..cache-control: no-cache..content-type: text/html..refresh: 10..transfer-encoding...
      1. Failed: HAProxy version is not found : TypeError: cannot read property 1 of null

      Expected:

      The version is: 2.0.13-2~bpo10+1 or 2.0.13

      Workaround:

      try {
      // return value.match(/HAProxy version (\d+\.\d+\.\d+),/)[1];
         return value.match(/HAProxy version (\d+\.\d+\.\d+)-/)[1];
      }
      catch (error) {
         throw "HAProxy version is not found : " + error;
      }

       

       

            mchudinov Maxim Chudinov (Inactive)
            faust Faustin
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: