Enum Class HealthStatus

java.lang.Object
java.lang.Enum<HealthStatus>
com.nmontytskyi.monitoring.model.HealthStatus
All Implemented Interfaces:
Serializable, Comparable<HealthStatus>, Constable

public enum HealthStatus extends Enum<HealthStatus>
Represents the availability state of a monitored microservice.

Determined by the monitoring system based on the service response and comparison of collected metrics against the defined SLA thresholds.

  • Enum Constant Details

    • UP

      public static final HealthStatus UP
      The service is responding and all metrics are within normal range.
    • DEGRADED

      public static final HealthStatus DEGRADED
      The service is responding but one or more metrics exceed SLA thresholds. For example: response time is higher than maxResponseTimeMs, or the error rate exceeds maxErrorRatePercent.
    • DOWN

      public static final HealthStatus DOWN
      The service is not responding to requests or returns a critical error (5xx).
    • UNKNOWN

      public static final HealthStatus UNKNOWN
      The state is unknown — no data is available for evaluation. Typical for newly registered services before the first metrics collection.
  • Method Details

    • values

      public static HealthStatus[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HealthStatus valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null