Back to list
Mcafee123

health-checks

by Mcafee123

0🍴 0📅 Jan 10, 2026

SKILL.md


name: health-checks description: Configure health check endpoints for affolterNET.Web.Api. Use when setting up /health endpoints, Kubernetes probes, or monitoring integration.

Health Check Endpoints

Configure health check endpoints for monitoring and container orchestration.

For complete reference, see Library Guide.

Built-in Endpoints

The API automatically provides these health check endpoints:

EndpointDescriptionUse Case
/healthAll health checksGeneral health status
/health/startupStartup checks onlyKubernetes startupProbe
/health/readyReadiness checksKubernetes readinessProbe

Built-in Health Checks

CheckDescription
StartupHealthCheckVerifies application has started successfully
KeycloakHealthCheckChecks Keycloak availability (if auth configured)
Self health checkBasic liveness check

Kubernetes Integration

Deployment YAML

apiVersion: apps/v1
kind: Deployment
spec:
  template:
    spec:
      containers:
        - name: api
          livenessProbe:
            httpGet:
              path: /health
              port: 80
            initialDelaySeconds: 10
            periodSeconds: 30
          readinessProbe:
            httpGet:
              path: /health/ready
              port: 80
            initialDelaySeconds: 5
            periodSeconds: 10
          startupProbe:
            httpGet:
              path: /health/startup
              port: 80
            failureThreshold: 30
            periodSeconds: 10

Response Format

Health check responses use the standard ASP.NET Core format:

{
  "status": "Healthy",
  "totalDuration": "00:00:00.0234567",
  "entries": {
    "startup": {
      "status": "Healthy",
      "duration": "00:00:00.0001234"
    },
    "keycloak": {
      "status": "Healthy",
      "duration": "00:00:00.0123456"
    }
  }
}

Status Values

StatusHTTP CodeDescription
Healthy200All checks passed
Degraded200Some checks degraded but functional
Unhealthy503One or more checks failed

Common Patterns

Docker Compose

services:
  api:
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:80/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

Load Balancer

Use /health/ready for load balancer health checks to ensure the service is ready to receive traffic.

Troubleshooting

Health check always unhealthy

  • Check logs for specific health check failures
  • Verify Keycloak is accessible if auth is configured
  • Ensure startup has completed before checks run

Kubernetes pod keeps restarting

  • Increase initialDelaySeconds on probes
  • Check startupProbe threshold is high enough
  • Review application startup time

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon