5

The standard behaviour for wildfly-17 (and 18) with microprofile-health-smallrye is, that the /health endpoints are published under the management port.

Is there a way to configure it to use a different port?

That behaviour is difficult in some situations (with docker and kubernetes) to open up the management port completely, and make it accessible, for other "machines" than localhost.

Thanks in advance,

Gabriel

3 Answers3

1

Jeff Mesnil answered my thread on the wildfly-user chat -> It is not possible to run health endpoint on application port. WildFly only expose them to the managment port.

Flo Sailer
  • 36
  • 3
0

Whilst I could not find a direct answer I did have a similar issue myself and implemented a solution.

I added the flag Dswarm.port.offset=100. For my thorntail set up this shifted all the port by 100.

Andrew
  • 85
  • 2
  • 8
0

My solution to publish metrics within a docker swarm, where port 9990 is not exposed, was to write a Proxy-Servlet registered under /metrics that returns the contents of http://127.0.0.1:9990/metrics. That way you don't expose the whole admin panel, but only the metrics part.

McIntosh
  • 2,051
  • 1
  • 22
  • 34