Closed SyntaxWarrior closed 4 years ago
This is what I see in the interface.
You are not using the HealthChecks UI response writer. Please take a look to the samples:
This repository works with Microsoft packages and you need to define the writer in the MaphealthChecks settings
Thank you. That was the solution.
For anyone else, on the service I want to monitor I added a reference to:
AspNetCore.HealthChecks.UI.Client
And updated my code to:
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapHealthChecks("/health", new HealthCheckOptions()
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
});
As a new user (since about 2 hours ago) I really like this project, and it was not to hard to get it working (well, besides this issue). One critique I might add is that I think its difficult to tell what code I need to add to which side. The service being monitored or the UI project. I mean it's clear now, but this was basically the only thing I had trouble extracting from the text.
Thanks @SyntaxWarrior. I might propose adding a new change to simplify and unify our endpoints with Microsoft's
I just created a new .net core project and added the health check UI to it in order to monitor a few services. I get the below error every time the background worker in the UI tries to collect data.
On the app I want to monitor I have
and in the UI I have (other than this its a default core 3.1 project)
The service I want to monitor is returning OK 200, and the word Healthy.
Any suggestions as to what I have done wrong?
P.S. I'm running everything on my localhost computer, and can surf to the urls in the browser.