AspNetCore.Diagnostics.HealthChecks: Health check UI is not showing nor recording status history when using SQL server storage provider

What happened: Health check UI is not showing nor recording status history when using SQL server storage provider.

What you expected to happen: Health check UI shows and records history in the same way as when using in memory storage provider (which works just fine)

How to reproduce it (as minimally and precisely as possible):

  • create Web API project
  • add health check UI as per code below
  • start the project
  • trigger status change on SampleCheck endpoint
  • check if history is displayed, check if HealthCheckExecutionHistories is populated

Source code sample: Startup.cs of .Net core API

 services
                .AddHealthChecksUI(setupSettings: setup =>
                {
                    setup.AddHealthCheckEndpoint("SampleCheck", "localhost:5111/status/ui");                    
                    setup.MaximumHistoryEntriesPerEndpoint(500);
                    setup.SetEvaluationTimeInSeconds(30);
                })
                .AddSqlServerStorage(Configuration.GetConnectionString("HealthChecksUIContext"));

Connection to db works fine, tables are created, other data is stored correctly, but HealthCheckExecutionHistories table remains empty.

Anything else we need to know?:

Environment:

  • .NET Core version: 3.1
  • Healthchecks version: 3.1.1
  • Operative system: Widows 10
  • Others:

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 36 (9 by maintainers)

Most upvoted comments

Hi all,

Seems the problem hasn’t been solved yet. I tried both InMemoryStorage and SqlServerStorage, but the UI doesn’t display the historical changes on the statuses.

These are the package versions I have used:

    <PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="5.0.2" />
    <PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />
    <PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
    <PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="5.0.1" />
    <PackageReference Include="AspNetCore.HealthChecks.UI.SqlServer.Storage" Version="5.0.1" />

@CarlosLanderas - thanks for answer.

The history icon is displayed next to each individual item, so it suggests that history tracking is per each individual item.

Anyways - from usability perspective it would be really nice if we track that on individual item level.