LiteX.HealthChecks.PostgreSql 3.0.0

PostgreSql health checks package used to check the status of a PostgreSql in .NET 5, .NET Core, .NET Standard based applications.

LiteXHealthChecks is very small yet powerful and high-performance library used to check the status of a component in the application, such as a backend service, database or some internal state.

Install-Package LiteX.HealthChecks.PostgreSql -Version 3.0.0
dotnet add package LiteX.HealthChecks.PostgreSql --version 3.0.0
<PackageReference Include="LiteX.HealthChecks.PostgreSql" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LiteX.HealthChecks.PostgreSql --version 3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LiteX.HealthChecks.PostgreSql, 3.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install LiteX.HealthChecks.PostgreSql as a Cake Addin
#addin nuget:?package=LiteX.HealthChecks.PostgreSql&version=3.0.0

// Install LiteX.HealthChecks.PostgreSql as a Cake Tool
#tool nuget:?package=LiteX.HealthChecks.PostgreSql&version=3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

LiteX HealthChecks PostgreSql

PostgreSql health checks package used to check the status of a PostgreSql in ASP.NET Core applications.

LiteXHealthChecks is very small yet powerful and high-performance library used to check the status of a component in the application, such as a backend service, database or some internal state.

Basic Usage

Install the package

Install via Nuget.

PM> Install-Package LiteX.HealthChecks.PostgreSql
AppSettings
{  
  "Data": {
    "ConnectionStrings": {
      "PostgreSql": "--REPLACE WITH YOUR CONNECTION STRING--"
    }
  }
}
Configure Startup Class
public class Startup
{
    public IConfiguration Configuration { get; }

    public Startup(IConfiguration configuration)
    {
        Configuration = configuration;
    }

    public void ConfigureServices(IServiceCollection services)
    {
        // 1: Use default configuration
        services.AddHealthChecks()
            .AddPostgreSql(Configuration["Data:ConnectionStrings:PostgreSql"]);

        // OR
        // 2: With all optional configuration
        services.AddHealthChecks()
            .AddPostgreSql(
                connectionString: Configuration["Data:ConnectionStrings:PostgreSql"],
                name: "postgresql",
                failureStatus: HealthStatus.Unhealthy,
                tags: new string[] { "db", "sql", "postgresql" });
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        app.UseHealthChecks("/health");
    }
}

Sample Usage Example

Sample for other services.

For more helpful information about LiteX HealthChecks, Please click here.

LiteX HealthChecks PostgreSql

PostgreSql health checks package used to check the status of a PostgreSql in ASP.NET Core applications.

LiteXHealthChecks is very small yet powerful and high-performance library used to check the status of a component in the application, such as a backend service, database or some internal state.

Basic Usage

Install the package

Install via Nuget.

PM> Install-Package LiteX.HealthChecks.PostgreSql
AppSettings
{  
  "Data": {
    "ConnectionStrings": {
      "PostgreSql": "--REPLACE WITH YOUR CONNECTION STRING--"
    }
  }
}
Configure Startup Class
public class Startup
{
    public IConfiguration Configuration { get; }

    public Startup(IConfiguration configuration)
    {
        Configuration = configuration;
    }

    public void ConfigureServices(IServiceCollection services)
    {
        // 1: Use default configuration
        services.AddHealthChecks()
            .AddPostgreSql(Configuration["Data:ConnectionStrings:PostgreSql"]);

        // OR
        // 2: With all optional configuration
        services.AddHealthChecks()
            .AddPostgreSql(
                connectionString: Configuration["Data:ConnectionStrings:PostgreSql"],
                name: "postgresql",
                failureStatus: HealthStatus.Unhealthy,
                tags: new string[] { "db", "sql", "postgresql" });
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        app.UseHealthChecks("/health");
    }
}

Sample Usage Example

Sample for other services.

For more helpful information about LiteX HealthChecks, Please click here.

Release Notes

Upgrade to .NET 5.x.
Added multi-framework target support - .NET 5, .NET Core 3.1, .NET Standard 2.1 and .NET Standard 2.0
Update libraries and SDKs to latest version.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.0.0 4,106 1/1/2021
2.0.0 17,944 4/6/2020
1.0.0 13,156 4/20/2019