dotnet-architecture / HealthChecks

Experimental Health Checks for building services, such as with ASP.NET Core
Other
454 stars 124 forks source link

Add PostgreSQL health check #10

Open lurumad opened 7 years ago

lurumad commented 7 years ago

I've added a health check for PostgreSQL.

Cheers!!!

alistair commented 7 years ago

This would be super useful but at the moment I have a concern with this approach. This adds a dependency on npgsql for all users of the data library, whether they are using it or not. This would only get worse if you add all the other databases in there as well.

Maybe healthcheck.Data should only use DbConnection and provide an method which allows a user to pass in that connection. Then the postgres, sqlserver, mysql extension methods can be implemented either in seperate packages and just leverages that.

damienbod commented 7 years ago

I think extension packages like the loggers do it would be a better solution.

lurumad commented 7 years ago

Yes, you are right!

But, Microsoft.Extensions.HealthChecks.Data could be a Nuget package also?

Cheers!

damienbod commented 7 years ago

sounds good to me, I created a seperate issue about the extension idea. https://github.com/aspnet/HealthChecks/issues/14