🩺
Observability & Deployment

Actuator for Microservices

Health Checks & Metrics
💡 Actuator, EK, "DASHBOARD, OF, GAUGES" hai, EK, CAR, ke, liye — Speed, fuel, engine, temperature, (health, metrics, info) HAR, MICROSERVICE, ke, liye, EASILY, dekhi, ja, sakti, HAIN, bina, ISE, MANUALLY, IMPLEMENT, kiye.

spring-boot-starter-actuator, se, /actuator/health, /actuator/metrics, aur, MANY, aur, ENDPOINTS, AUTOMATICALLY, AVAILABLE, ho, jaate, HAIN — Kubernetes, liveness/readiness, probes, aur, monitoring, tools, (Prometheus) YE, ENDPOINTS, USE, karte, HAIN.

Custom, health, indicators, (HealthIndicator, interface, IMPLEMENT, karके) banaye, ja, sakte, HAIN — jaise, EK, custom, check, JO, EK, EXTERNAL, DEPENDENCY, (database, message, broker) ki, HEALTH, VERIFY, karta hai.

@Component
public class DatabaseHealthIndicator implements HealthIndicator {
    @Override
    public Health health() {
        boolean dbUp = checkDatabaseConnection();
        return dbUp ? Health.up().build() : Health.down().withDetail("reason", "DB unreachable").build();
    }
}

// application.yml:
// management.endpoints.web.exposure.include: health,metrics,prometheus
🩺
Actuator, EK, "DASHBOARD, OF, GAUGES" hai, EK, CAR, ke, liye — Speed, fuel, engine, temperature, (health, metrics, info) HAR, MICROSERVICE, ke, liye, EASILY, dekhi, ja, sakti, HAIN, bina, ISE, MANUALLY, IMPLEMENT, kiye.
1 / 2
⚡ Quick Recap
  • Actuator = health, metrics, aur, monitoring, endpoints, automatically, available
  • Custom health indicators, (HealthIndicator), specific, dependencies, ke, liye
  • liveness/readiness, endpoints, Kubernetes, probes, ke, saath, directly, map, karte, hain
On this page (2 subtopics)

Production, mein, /actuator/**, endpoints, ko, EXPOSE, karte, waqt, Spring, Security, se, secure, karna, CRITICAL, hai — sirf, /actuator/health, PUBLIC, hona, CHAHIYE (Kubernetes, probes, ke, liye), BAAKI, endpoints, (jaise, /actuator/env) authentication, ke, PEECHE, HONE, chahiye.

management.endpoint.env.enabled: false   // sensitive, endpoint, disable, karo

Micrometer, (Actuator, ke, ANDAR, embedded) se, CUSTOM, business, metrics, (jaise, "orders_created_total") RECORD, ki, ja, sakti, hain — Prometheus, se, SCRAPE, ho, sakti, hain, business-specific, dashboards, ke, liye.