# Expose Server Metrics to Third Party Applications

**URL:** <https://forum.inductiveautomation.com/t/expose-server-metrics-to-third-party-applications/63276>\
**Category:** Module Development\
**Tags:** scripting\
**Created:** [August 22, 2022, 3:21pm UTC](https://forum.inductiveautomation.com/t/expose-server-metrics-to-third-party-applications/63276 "2022-08-22T15:21:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alec/32/41994_2.png) [@alec](https://forum.inductiveautomation.com/u/alec)\
**Post date:** [August 22, 2022, 3:21pm UTC](https://forum.inductiveautomation.com/t/expose-server-metrics-to-third-party-applications/63276/1 "2022-08-22T15:21:28Z")

</div>

Is there a way to expose the server metrics such as the ones under the Metrics Dashboard to a third-party app such as [prometheus](https://prometheus.io/)?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 22, 2022, 3:54pm UTC](https://forum.inductiveautomation.com/t/expose-server-metrics-to-third-party-applications/63276/2 "2022-08-22T15:54:53Z")

</div>

Did you mean to post this under the module development category?

The answer is that there’s nothing immediately accessible (though this is something we’re interested in doing first party), but there’s nothing stopping you from writing a module to do this. In your module hook’s setup invocation, you’ll get a GatewayContext object that has a `MetricRegistry` getter:  
[https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.19/com/inductiveautomation/ignition/gateway/model/GatewayContext.html#getMetricRegistry()](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.19/com/inductiveautomation/ignition/gateway/model/GatewayContext.html#getMetricRegistry())

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [August 22, 2022, 3:59pm UTC](https://forum.inductiveautomation.com/t/expose-server-metrics-to-third-party-applications/63276/3 "2022-08-22T15:59:32Z")

</div>

If you have [WebDev Module](https://docs.inductiveautomation.com/display/DOC81/WebDev+Module), it isn’t too bad to put together a simple metrics endpoint that Prometheus can consume via `scrape_configs`. You’d just use the [python resource](https://docs.inductiveautomation.com/display/DOC81/Web+Dev#WebDev-PythonResources) in WebDev and return a GET payload in the [Text-based exposition format](https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format).
