diff --git a/eureka-core/src/main/java/com/netflix/eureka/registry/PeerAwareInstanceRegistryImpl.java b/eureka-core/src/main/java/com/netflix/eureka/registry/PeerAwareInstanceRegistryImpl.java index 73dce9029..1bfd39bc9 100644 --- a/eureka-core/src/main/java/com/netflix/eureka/registry/PeerAwareInstanceRegistryImpl.java +++ b/eureka-core/src/main/java/com/netflix/eureka/registry/PeerAwareInstanceRegistryImpl.java @@ -512,6 +512,11 @@ public boolean isSelfPreservationModeEnabled() { return serverConfig.shouldEnableSelfPreservation(); } + @com.netflix.servo.annotations.Monitor(name = METRIC_REGISTRY_PREFIX + "isSelfPreservationModeEnabled", type = DataSourceType.GAUGE) + public int isSelfPreservationModeEnabledMetric() { + return isSelfPreservationModeEnabled() ? 1 : 0; + } + @Override public InstanceInfo getNextServerFromEureka(String virtualHostname, boolean secure) { // TODO Auto-generated method stub