Skip to content

Commit

Permalink
Make http fields in HAProxy optional to improve compatibility with 1.5
Browse files Browse the repository at this point in the history
It seems the http fields do not always exists in HAProxy 1.5. We currently only support 1.6 but as this will not break things, I made the fields optional for better compatibility.
  • Loading branch information
ruflin committed Mar 22, 2017
1 parent 3bcebf6 commit 834b270
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions metricbeat/module/haproxy/stat/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ var (
"time.avg": c.Int("Rtime", s.Optional),
"denied": c.Int("Dresp"),
"http": s.Object{
"1xx": c.Int("Hrsp1xx"),
"2xx": c.Int("Hrsp2xx"),
"3xx": c.Int("Hrsp3xx"),
"4xx": c.Int("Hrsp4xx"),
"5xx": c.Int("Hrsp5xx"),
"other": c.Int("HrspOther"),
"1xx": c.Int("Hrsp1xx", s.Optional),
"2xx": c.Int("Hrsp2xx", s.Optional),
"3xx": c.Int("Hrsp3xx", s.Optional),
"4xx": c.Int("Hrsp4xx", s.Optional),
"5xx": c.Int("Hrsp5xx", s.Optional),
"other": c.Int("HrspOther", s.Optional),
},
},

Expand Down

0 comments on commit 834b270

Please sign in to comment.