# Metricbeat: haproxy module - Error converting param to

**URL:** <https://discuss.elastic.co/t/metricbeat-haproxy-module-error-converting-param-to/122551>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 5, 2018, 3:24pm UTC](https://discuss.elastic.co/t/metricbeat-haproxy-module-error-converting-param-to/122551 "2018-03-05T15:24:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![neizmirasego](https://avatars.discourse-cdn.com/v4/letter/n/ac91a4/32.png) [@neizmirasego](https://discuss.elastic.co/u/neizmirasego)\
**Post date:** [March 5, 2018, 3:24pm UTC](https://discuss.elastic.co/t/metricbeat-haproxy-module-error-converting-param-to/122551/1 "2018-03-05T15:24:40Z")

</div>

Hi everyone!

I have some problems with haproxy module. Here are some details..

- Beat version - metricbeat-6.2.2-1
- Operating System - CentOS Linux release 7.2.1511
- Configuration  
`metricbeat.modules: hosts: ['localhost:8183'] metricsets: [stat, info] module: haproxy password: admin period: 60s username: admin`

`listen stats bind 0.0.0.0:8183 mode http stats enable stats hide-version stats uri /stats stats realm HAProxy\ Statistics stats auth admin:admin stats refresh 3s`

This is a part of `show stat` output:  
`# 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, elasticsearch-backend,node013,0,0,0,1,,6869,1084620,28819409,,0,,0,0,0,0,UP,1,1,0,0,0,11934,0,,1,2,1,,6869,,2,0,,10,L4OK,,0,0,6869,0,0,0,0,0,,,,0,0,,,,,2,,,0,0,2,3, elasticsearch-backend,node014,0,0,0,1,,6879,1085777,28368301,,0,,0,0,0,0,UP,1,1,0,0,0,11934,0,,1,2,2,,6879,,2,0,,10,L4OK,,0,0,6879,0,0,0,0,0,,,,0,0,,,,,2,,,0,0,8,9, elasticsearch-backend,node015,0,0,0,1,,6868,1087537,28801337,,0,,0,0,0,0,UP,1,1,0,0,0,11934,0,,1,2,3,,6868,,2,0,,10,L4OK,,0,0,6868,0,0,0,0,0,,,,0,0,,,,,2,,,0,0,9,9, elasticsearch-backend,BACKEND,0,0,0,2,200,20616,3257934,85989047,0,0,,0,0,0,0,UP,3,3,0,,0,11934,0,,1,2,0,,20616,,1,0,,30,,,,0,20616,0,0,0,0,,,,,0,0,0,0,0,0,2,,,0,0,4,5,`

And errors from metricbeat logs:  
`2018-03-05T15:21:41.454Z ERROR schema/schema.go:41 Error on field 'id': Missing field: id, Error: Error converting param to int: Sid 2018-03-05T15:21:41.454Z ERROR schema/schema.go:41 Error on field 'total': Missing field: total, Error: Error converting param to int: Stot 2018-03-05T15:21:41.454Z ERROR schema/schema.go:41 Error on field 'id': Missing field: id, Error: Error converting param to int: Iid 2018-03-05T15:21:41.454Z ERROR schema/schema.go:41 Error on field 'process_id': Missing field: process_id, Error: Error converting param to int: Pid 2018-03-05T15:21:41.454Z ERROR schema/schema.go:41 Error on field 'in.bytes': Missing field: in.bytes, Error: Error converting param to int: Bin 2018-03-05T15:21:41.454Z ERROR schema/schema.go:41 Error on field 'out.bytes': Missing field: out.bytes, Error: Error converting param to int: Bout 2018-03-05T15:21:41.454Z ERROR schema/schema.go:41 Error on field 'component_type': Missing field: component_type, Error: Error converting param to int: Type` and so on...

I saw similar questions here related to optional fields, but now I have necessary fields in `show stat` output, but get `Missing field` errors.

Thanks in advance for any assistance!

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [March 5, 2018, 11:52pm UTC](https://discuss.elastic.co/t/metricbeat-haproxy-module-error-converting-param-to/122551/2 "2018-03-05T23:52:00Z")

</div>

Hi @neizmirasego,

I'm sorry you are having problems using the haproxy module of metricbeat. I have seen that you are using authentication, but this is only supported when connecting to haproxy stats using the http protocol, could you try to change the hosts configuration to `['http://localhost:8183/stats']`? Take into account when using http that the `info` metricset is not available.

If it still doesn't work, what is the haproxy version you are using?

---

<div class="post-metadata">

**Author:** ![neizmirasego](https://avatars.discourse-cdn.com/v4/letter/n/ac91a4/32.png) [@neizmirasego](https://discuss.elastic.co/u/neizmirasego)\
**Post date:** [March 6, 2018, 7:01am UTC](https://discuss.elastic.co/t/metricbeat-haproxy-module-error-converting-param-to/122551/3 "2018-03-06T07:01:29Z")

</div>

Hi @jsoriano,

Thanks for your help! Looks like I tried hard but not enough. Changing the `hosts` to `['http://localhost:8183/stats']` solved the issue!  
Sorry for bothering and have a nice day!

Thanks

---

<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 3, 2018, 7:01am UTC](https://discuss.elastic.co/t/metricbeat-haproxy-module-error-converting-param-to/122551/4 "2018-04-03T07:01:42Z")

</div>

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