HTTP Management and health checks

I am using the HTTP Management in an existing HTTP server adding the routes in the following way:

restServer.addRoute(ClusterHttpManagementRoutes.all(Cluster.get(getContext().getSystem())));

For the cluster management routes (/cluster/members …) that works perfectly. But the health check routes are not added. Is this the expected behaviour or am I doing something wrong?

I was able to use the health check routes when I started the Akka Management on a separate HTTP server:

AkkaManagement.get(getContext().getSystem()).start();

But I really would like to provide these checks in my existing HTTP server. Did anybody manage to add the health check routes to an existing HTTP server and can point me into the correct direction?

Thanks,
Lay

The akka.management.HealthCheckRoutes is internal, with a note in the scaladoc about exactly this: https://github.com/akka/akka-management/blob/master/management/src/main/scala/akka/management/HealthCheckRoutes.scala#L20

If you’d be up for doing a PR opening that up it would be good!

Hi Johan,

Thanks for clarifying this!

I just created a feature request (https://github.com/akka/akka-management/issues/599) and I will try to fix this myself and provide a PR.