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:
- Install zabbix Haproxy from Debian official packages (or backports)
- 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;
}