# HAProxy module has issues with metricbeat

**URL:** <https://discuss.elastic.co/t/haproxy-module-has-issues-with-metricbeat/77637>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 7, 2017, 10:28am UTC](https://discuss.elastic.co/t/haproxy-module-has-issues-with-metricbeat/77637 "2017-03-07T10:28:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_guo/32/42297_2.png) [@Robin\_Guo](https://discuss.elastic.co/u/Robin_Guo)\
**Post date:** [March 7, 2017, 10:28am UTC](https://discuss.elastic.co/t/haproxy-module-has-issues-with-metricbeat/77637/1 "2017-03-07T10:28:20Z")

</div>

Dear folks,

Another issue is coming with HAProxy module for Metricbeat, Today I just enabled Haproxy module within metricbeat,  
but I got some error messages from metricbeat for collect Haprox metrics 1xx to 5xx etc. I google this , seems this issues is occured before, and fixed by elastic team, but I don't know why this issues is appeared again.

**Env:**

```
OS: centOS 6.8
Metricbeat: 5.2.1-1
HAproxy: 1.5.4

```

**Config:**

haproxy.cfg

```
stats socket 127.0.0.1:14567

```

metricbeat.yml

```
- module: haproxy
  metricsets: 
    - "info"
    - "stat"
  enabled: true
  period: 10s
  hosts: ["tcp://127.0.0.1:14567"]

```

**Test:**

**echo 'show stat' | nc 127.0.0.1 14567**

```
pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,
beats,FRONTEND,,,10,10,15000,10,0,0,0,0,0,,,,,OPEN,,,,,,,,,1,2,0,,,,0,0,0,3,,,,,,,,,,,0,0,0,,,0,0,0,0,,,,,,,,
dashboard,FRONTEND,,,0,0,2000,0,0,0,0,0,0,,,,,OPEN,,,,,,,,,1,3,0,,,,0,0,0,0,,,,,,,,,,,0,0,0,,,0,0,0,0,,,,,,,,
logstash,logstash1,0,0,4,4,5000,4,0,0,,0,,0,0,0,0,UP,1,1,0,0,0,12704,0,,1,4,1,,4,,2,0,,1,L4OK,,0,,,,,,,0,,,,0,0,,,,,12695,,,0,0,0,0,
logstash,logstash2,0,0,3,3,5000,3,0,0,,0,,0,0,0,0,UP,1,1,0,0,0,12704,0,,1,4,2,,3,,2,0,,1,L4OK,,0,,,,,,,0,,,,0,0,,,,,12697,,,0,0,0,0,
logstash,logstash3,0,0,3,3,5000,3,0,0,,0,,0,0,0,0,UP,1,1,0,0,0,12704,0,,1,4,3,,3,,2,0,,1,L4OK,,0,,,,,,,0,,,,0,0,,,,,12696,,,0,0,0,0,
logstash,BACKEND,0,0,10,10,1500,10,0,0,0,0,,0,0,0,0,UP,3,3,0,,0,12704,0,,1,4,0,,10,,1,0,,3,,,,,,,,,,,,,,0,0,0,0,0,0,12695,,,0,0,0,0,
elk5,ukelastic-test6,0,0,0,0,1000,0,0,0,,0,,0,0,0,0,UP,1,1,0,0,0,12704,0,,1,5,1,,0,,2,0,,0,L4OK,,0,,,,,,,0,,,,0,0,,,,,-1,,,0,0,0,0,
elk5,ukelastic-test7,0,0,0,0,1000,0,0,0,,0,,0,0,0,0,UP,1,1,0,0,0,12704,0,,1,5,2,,0,,2,0,,0,L4OK,,0,,,,,,,0,,,,0,0,,,,,-1,,,0,0,0,0,
elk5,BACKEND,0,0,0,0,200,0,0,0,0,0,,0,0,0,0,UP,2,2,0,,0,12704,0,,1,5,0,,0,,1,0,,0,,,,,,,,,,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,

```

**LOG:**

```
2017-03-07T18:12:51+08:00 ERR Error on field '1xx': Error converting param to int: Hrsp1xx
2017-03-07T18:12:51+08:00 ERR Error on field '2xx': Error converting param to int: Hrsp2xx
2017-03-07T18:12:51+08:00 ERR Error on field '1xx': Error converting param to int: Hrsp1xx
2017-03-07T18:12:51+08:00 ERR Error on field '2xx': Error converting param to int: Hrsp2xx
2017-03-07T18:12:51+08:00 ERR Error on field '3xx': Error converting param to int: Hrsp3xx
2017-03-07T18:12:51+08:00 ERR Error on field '4xx': Error converting param to int: Hrsp4xx
2017-03-07T18:12:51+08:00 ERR Error on field '5xx': Error converting param to int: Hrsp5xx
2017-03-07T18:12:51+08:00 ERR Error on field 'other': Error converting param to int: HrspOther
```

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [March 11, 2017, 4:05pm UTC](https://discuss.elastic.co/t/haproxy-module-has-issues-with-metricbeat/77637/2 "2017-03-11T16:05:47Z")

</div>

Thanks a lot for providing all the data. That makes it really easy to identify issue. We did a fix some issues in the past and made some fields optional. But it seems we didn't change the ones you mentioned here. I checked for the fields you mentioned above and they are required. All the fields here would required an optional flag. See: [https://github.com/elastic/beats/blob/master/metricbeat/module/haproxy/stat/data.go#L52](https://github.com/elastic/beats/blob/master/metricbeat/module/haproxy/stat/data.go#L52)

Could you either open a Github issue with the same details above or directly open a PR with the change?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 8, 2017, 4:05pm UTC](https://discuss.elastic.co/t/haproxy-module-has-issues-with-metricbeat/77637/3 "2017-04-08T16:05:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
