Integrating with Undertow.io HTTP server

141 views
Skip to first unread message

boris.n...@gmail.com

unread,
Nov 15, 2018, 3:44:08 PM11/15/18
to Prometheus Users
Hi,

Using Prometheus Java library, is it possible to export prometheus http endpoints over existing Undertow HTTP server?

Thanks,
-Borys N

Simon Pasquier

unread,
Nov 16, 2018, 4:48:41 AM11/16/18
to boris.n...@gmail.com, promethe...@googlegroups.com
You probably want to use the JMX exporter [1].

[1] https://github.com/prometheus/jmx_exporter
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To post to this group, send email to promethe...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ee19e670-5959-43c1-830b-456675dfb0d3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

boris.n...@gmail.com

unread,
Nov 16, 2018, 1:23:45 PM11/16/18
to Prometheus Users
With this approach I will have another HTTP server on another port just for metric. I would prefer to integrate with undertow HTTP server, which I have already started with my process.

Simon Pasquier

unread,
Nov 20, 2018, 4:32:29 AM11/20/18
to Boris Nebosenko, promethe...@googlegroups.com
I asked someone who's more knowledgeable than me on this topic and
here's his comment:

I believe what they’re asking is how difficult it would be to
replicate what the Prometheus http server does, ie they want to
provide a Prometheus endpoint on their existing server, eg adding a
/metics context. Is there something they could use within their
undertow request handler for this? Which I think is basically this:
https://github.com/prometheus/client_java/blob/master/simpleclient_httpserver/src/main/java/io/prometheus/client/exporter/HTTPServer.java#L59

Hope this helps...
On Fri, Nov 16, 2018 at 7:23 PM <boris.n...@gmail.com> wrote:
>
> With this approach I will have another HTTP server on another port just for metric. I would prefer to integrate with undertow HTTP server, which I have already started with my process.
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To post to this group, send email to promethe...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/1c9832ef-84a5-40fc-a6df-efbc2476bfa9%40googlegroups.com.

Meier

unread,
Nov 21, 2018, 3:40:46 AM11/21/18
to Prometheus Users
maybe looking at how spring-boot implements the metrics actuator is a strating point for ideas.
Reply all
Reply to author
Forward
0 new messages