Haproxy stat 'show info' via http


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.

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 !

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: