healthcheck-dotnet-postgresql

Register PostgreSQL readiness health checks for ASP.NET Core applications using Npgsql.

12|2|Updated May 4, 2020
One-click install
npx skills add https://github.com/hoangnh2412/jarvis --skill healthcheck-dotnet-postgresql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: healthcheck-dotnet-postgresql
Source: https://github.com/hoangnh2412/jarvis/tree/main/.opencode/skills/healthcheck-dotnet/providers/postgresql
Command: npx skills add https://github.com/hoangnh2412/jarvis --skill healthcheck-dotnet-postgresql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires AspNetCore.HealthChecks.NpgSql.

What problem does it solve?

Manually configuring PostgreSQL readiness health checks for .NET ASP.NET Core applications is repetitive and prone to configuration errors, which can lead to undetected database outages during deployments or missed probe failures in orchestration platforms.

Core Features & Use Cases

  • Automated Probe Registration: Adds Npgsql-based PostgreSQL readiness health checks to the .NET HealthChecks pipeline with a single configuration step.
  • Connection String Binding: Automatically retrieves the correct database connection string from application configuration to avoid hardcoding sensitive credentials.
  • Use Case: For teams using the Jarvis .NET 9 backend framework, this skill lets you quickly add a /health/ready endpoint that validates PostgreSQL connectivity, ensuring Kubernetes or other orchestration tools only route traffic to healthy service instances.

Quick Start

Use the healthcheck-dotnet-postgresql skill to register a PostgreSQL readiness health check for your .NET project's configured main database connection string.

Frequently Asked Questions about healthcheck-dotnet-postgresql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a PostgreSQL readiness health check to an ASP.NET Core app?

You can add a PostgreSQL readiness health check by registering the Npgsql provider in your ASP.NET Core health checks pipeline. This automatically binds the connection string from configuration and tags the probe for the /health/ready endpoint.

What is a readiness health check and when do I need it for .NET backend deployments?

A readiness health check validates if an application is prepared to handle traffic, such as confirming database connectivity. You need it for .NET backend deployments using orchestration platforms like Kubernetes to ensure traffic is only routed to healthy service instances.

Does this PostgreSQL health check require hardcoding the database connection string?

No, the PostgreSQL health check does not require hardcoding the database connection string. It automatically retrieves and binds the correct database connection string from your application configuration to avoid exposing sensitive credentials.

Can I use this skill to configure health probes for Kubernetes orchestration in .NET?

Yes, you can use this skill to configure health probes for Kubernetes orchestration in .NET. It adds a /health/ready endpoint that validates PostgreSQL connectivity, ensuring Kubernetes only routes traffic to healthy service instances.

What happens when the PostgreSQL database is unavailable during an ASP.NET Core readiness probe?

When the PostgreSQL database is unavailable during an ASP.NET Core readiness probe, the AddNpgSql extension method sets the failure status to Unhealthy. This status instructs orchestration tools to stop routing traffic to that service instance.