Haproxy stat 'show info' via http


#1

Hi.

Is there an option to get the field and values via http for the equivalent ‘show info’ socket command?

The http stats API seems to only support retrieving the ‘show stat’ info (As html or csv format) - I couldn’t find a proper documentation about any other stats options which can retrieved via http.


#2

Hi Shlompy,

No, there is no option provided with HAProxy to display the metrics of stats socket commands other than “show stat” via HTTP. That is, the HAProxy HTTP stats API only supports displaying metrics of show stat command.

However, there does exist a workaround, which involves implementing a custom API to access data from UNIX domain socket via TCP/IP using SOCAT. The build for the API along with the implementation details are provided at following GitHub link: https://github.com/kamermans/HAProxyAPI

Hope this is helpful !


#3

Thanks shivharsh.

I’ll implement my own http API if I’ll have to, shouldn’t be complicated. I just hoped to get something built-in from haproxy… :frowning: