Smithery Logo
MCPsSkillsDocsPricing
Login
NewFlame, an assistant that learns and improves. Available onTelegramSlack
    secondsky

    health-check-endpoints

    secondsky/health-check-endpoints
    DevOps
    38

    About

    SKILL.md

    Install

    • Telegram
      Telegram
    • Slack
      Slack
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    • Download skill
    ├─
    ├─
    └─
    Smithery Logo

    Give agents more agency

    Resources

    DocumentationPrivacy PolicySystem Status

    Company

    PricingAboutBlog

    Connect

    © 2026 Smithery. All rights reserved.

    About

    Health check endpoints for liveness, readiness, dependency monitoring...

    SKILL.md

    Health Check Endpoints

    Implement health checks for monitoring service availability and readiness.

    Probe Types

    Probe Purpose Failure Action
    Liveness Is process alive? Restart container
    Readiness Can handle traffic? Remove from LB
    Startup Has app started? Delay other probes
    Deep All deps healthy? Trigger alerts

    Implementation (Express)

    class HealthChecker {
      async checkDatabase() {
        const start = Date.now();
        try {
          await db.query('SELECT 1');
          return { status: 'healthy', latency: Date.now() - start };
        } catch (err) {
          return { status: 'unhealthy', error: String(err?.message || err) };
        }
      }
    
      async checkRedis() {
        try {
          await redis.ping();
          return { status: 'healthy' };
        } catch (err) {
          return { status: 'unhealthy', error: err.message };
        }
      }
    
      async getReadiness() {
        const checks = await Promise.all([
          this.checkDatabase(),
          this.checkRedis()
        ]);
        const healthy = checks.every(c => c.status === 'healthy');
        return { healthy, checks };
      }
    }
    
    // Liveness - lightweight
    app.get('/health/live', (req, res) => {
      res.json({ status: 'ok', timestamp: new Date().toISOString() });
    });
    
    // Readiness - check dependencies
    app.get('/health/ready', async (req, res) => {
      const health = await healthChecker.getReadiness();
      res.status(health.healthy ? 200 : 503).json(health);
    });
    

    Kubernetes Configuration

    livenessProbe:
      httpGet:
        path: /health/live
        port: 3000
      initialDelaySeconds: 15
      periodSeconds: 10
      failureThreshold: 3
    
    readinessProbe:
      httpGet:
        path: /health/ready
        port: 3000
      initialDelaySeconds: 5
      periodSeconds: 10
    

    Best Practices

    • Keep liveness checks minimal (no external deps)
    • Check only critical systems in readiness
    • Return 200 for healthy, 503 for unhealthy
    • Set reasonable timeouts to prevent cascading failures
    • Include response time metrics

    Additional Implementations

    See references/implementations.md for:

    • Python Flask complete health checker
    • Java Spring Boot Actuator
    • Full Kubernetes deployment config

    Never Do

    • Make liveness depend on external services
    • Return 200 when dependencies are down
    • Skip dependency checks in readiness
    Recommended Servers
    Data Compliance Classifier MCP
    Data Compliance Classifier MCP
    Food Safety Intelligence
    Food Safety Intelligence
    GENESIS ProofRelay MCP Verifier
    GENESIS ProofRelay MCP Verifier
    Repository
    secondsky/claude-skills
    Files