# Custom Prometheus metrics with Lua Script

**URL:** <https://discourse.haproxy.org/t/custom-prometheus-metrics-with-lua-script/11272>\
**Category:** Lua Scripts\
**Created:** [October 11, 2024, 9:32am UTC](https://discourse.haproxy.org/t/custom-prometheus-metrics-with-lua-script/11272 "2024-10-11T09:32:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flowdopip](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@flowdopip](https://discourse.haproxy.org/u/flowdopip)\
**Post date:** [October 11, 2024, 9:32am UTC](https://discourse.haproxy.org/t/custom-prometheus-metrics-with-lua-script/11272/1 "2024-10-11T09:32:11Z")

</div>

Hi All,

I want to build some custom Prometheus metrics (“business rules”) with all my information on the HTTP Request. I could already do it with LUA Script but on a new specific path to expose the metrics. I want to do that on the default metrics exposed by the HAProxy exporter instead of having two endpoints to expose the default metrics and another one for the custom metrics.

Is that possible? with performance obviously

---

<div class="post-metadata">

**Author:** ![nkbaixiaojie](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@nkbaixiaojie](https://discourse.haproxy.org/u/nkbaixiaojie)\
**Post date:** [July 23, 2025, 6:56am UTC](https://discourse.haproxy.org/t/custom-prometheus-metrics-with-lua-script/11272/2 "2025-07-23T06:56:45Z")

</div>

@flowdopip can you extend the HAProxy Prometheus Metrics with your information, I want to extend but no idea about how to do.
