-
Perform benchmark tests with different metrics_refresh_interval.
-
Contact HAProxy developers to propose/discuss getting
stats_dump_fields_typedfunction exposed to Lua eventually
Although we can build metrics for prometheus using only
HAProxy Lua API, namely Proxy.get_stats() and Server.get_stats()
functions, these functions do not provide any information about
metric types, so we have to hardcode that alongside with translations
for Prometheus. Version 0.0.1
implemented this approach.
However, HAProxy has an output format
that includes metric type in the response: show stat type. Using this output we can
automatically translate HAProxy internal metric types into prometheus types.
This output is generated by stats_dump_fields_typed function,
which is not yet exposed to Lua, so we have to configure stats socket and
send a request to it from Lua.