HAProxy community

HAProxy REST API for statistics report


Does HAProxy support REST API for statistics?

The below HAProxy REST API documentation doesn;t list any APIs for Stats.

I am looking to fetch URL based stats as listed below via HAProxy REST API.
Is the support for HAProxy stats REST API available or planned to be available in future release?

Please share which future release might have this support.


You can GET the stats in CSV format by appending ;csv;norefresh to your stats URL. Eg:;csv;norefresh

Will that work for your needs?


Is there any other way (apart from CSV) to fetch HAProxy stats from external service?

Is there any plan to add REST APIs to HAProxy in future for fetching the stats?

I am looking to add a microservice which could expose customized REST APIs for HAProxy stats.

Using CSV way, I need to write a library to parse the stats in csv format and then add REST API over it.


You also have the admin socket, and there are a number of available python libraries out there that use that admin socket (just google for “haproxy python”).

But no, there is not REST API, I don’t know about the enterprise edition you are quoting above, but surely not in the open source edition.