Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
4.05k stars 793 forks source link

Immutable Deployments - Option for in memory (or other alternative) healthcheckdb for UI? #29

Closed cscheib closed 4 years ago

cscheib commented 5 years ago

Have you considered options other than persisting a sqlite file to disk for the healthcheckdb?

We've been moving toward an immutable runtime environment model (Azure App Service using "Run From Package"), which means writing that file to disk is going to fail.

It looks like I can forgo instantiating the UI, and just query /healthchecks-api for check results, which may suffice for our needs. But, a UI is always nice.

CarlosLanderas commented 5 years ago

@unaizorrilla what do you think about this. It's obvious that the UI is not prepared for this kind of scenario. Could we implement additional providers?

unaizorrilla commented 5 years ago

Well, this is not a priority on this moment!

unaizorrilla commented 5 years ago

Hi @cscheib

I need to create a new feature for supporting specifying the database path, probably I try to add support for sqlite on memory also on this new feature.

HalidCisse commented 5 years ago

I had same issue before when my app fail to start because it cant write to the disk, how about an efcore dbcontext implementation ?

unaizorrilla commented 5 years ago

Hi @HalidCisse

With new versions you can specify the db path for Sqlite. Check UIAndApi sample and the new appsettings.json parameter configuration.

Next version of the ui probably include a memory database support!

SychevIgor commented 5 years ago

Totally agree with @cscheib , we need at least in memory provider or better - they way to configure persistence. We can't even create some work around to replace AddHealthChecksUI call from an library https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/src/HealthChecks.UI/ServiceCollectionExtensions.cs Because protection level for dbcontext, model classes, and Keys.cs not allowing it

unaizorrilla commented 5 years ago

Hi @SychevIgor

We try to add this feature on next ui version, thanks for your feedback.

Unai

Odonno commented 5 years ago

What about using Microsoft.EntityFrameworkCore.InMemory and using an enum as an option to specify what storage we want to use?

enum HealthCheckStorageOption
{
  InMemory,
  Sqlite,
  SqlServer
}
jalfaCM commented 5 years ago

Hello, is this feature still on track to be added?

unaizorrilla commented 5 years ago

We are working on next version and this is the behavior bu default.

jalfaCM commented 5 years ago

I appreciate the work that you're doing. Would it be too much for me to ask on when we could expect said feature?

unaizorrilla commented 5 years ago

Hi @jalfaCM

I try to release before summer!

adcy commented 4 years ago

@unaizorrilla any updates? Still in plan or suspended?

alfreql commented 4 years ago

Hi, if I dont want the health history, Can I disable the use of the db? How can I do it?

CarlosLanderas commented 4 years ago

Storage providers feature has been implemented in UI version 3.1.1-preview1. https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/issues/455#issuecomment-613093369

alfreql commented 4 years ago

Hi, Is there a way to not use database at all, or disable it? I don't interesting in historical data.

CarlosLanderas commented 4 years ago

Sure, you have the InMemoryProvider :)