Metricbeat: haproxy module - Error converting param to


(Sid) #1

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!


(Jaime Soriano) #2

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?


(Sid) #3

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


(system) #4

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