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

    Details

    • Type: Patch request
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.4.7, 5.0.0alpha4
    • Fix Version/s: 4.4.8rc1, 5.0.0beta2, 5.0 (plan)
    • Component/s: Templates (T)
    • Labels:
      None
    • Environment:
      Zabbix 4.4.7
      HAProxy version 2.0.13-2~bpo10+1
    • Team:
      Team INT
    • Sprint:
      Sprint 63 (Apr 2020)
    • Story Points:
      0.125

      Description

      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;
      }

       

       

        Attachments

          Activity

            People

            Assignee:
            mchudinov Maxim Chudinov
            Reporter:
            faust Faustin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: