jsp.header.jsp Maven / Gradle / Ivy
The newest version!
<%@ page language="java"
import="java.util.*,com.netflix.config.*,com.netflix.eureka.*,com.netflix.eureka.registry.*,com.netflix.eureka.resources.*,com.netflix.appinfo.*,com.netflix.eureka.util.*" pageEncoding="UTF-8" %>
<%@page import="com.netflix.appinfo.AmazonInfo.MetaDataKey"%>
<%
EurekaServerContext serverContext = (EurekaServerContext) pageContext.getServletContext()
.getAttribute(EurekaServerContext.class.getName());
InstanceInfo selfInstanceInfo = serverContext.getApplicationInfoManager().getInfo();
DataCenterInfo info = selfInstanceInfo.getDataCenterInfo();
PeerAwareInstanceRegistry registry =serverContext.getRegistry();
AmazonInfo amazonInfo = null;
if(info.getName() == DataCenterInfo.Name.Amazon) {
amazonInfo = (AmazonInfo)info;
}
if(amazonInfo != null) {
out.print(" EUREKA SERVER (AMI: " + amazonInfo.get(AmazonInfo.MetaDataKey.amiId) +")");
}
out.print("");
%>
Environment: <%= ConfigurationManager.getDeploymentContext().getDeploymentEnvironment() %>, Data center: <%= ConfigurationManager.getDeploymentContext().getDeploymentDatacenter() %>
<%
if(amazonInfo != null) {
out.print("Zone: " + amazonInfo.get(AmazonInfo.MetaDataKey.availabilityZone) + ", instance-id: " + amazonInfo.get(AmazonInfo.MetaDataKey.instanceId));
}
%>
Current time: <%=StatusResource.getCurrentTimeAsString() %>, Uptime: <%=StatusInfo.getUpTime()%>
Lease expiration enabled: <%=registry.isLeaseExpirationEnabled() %>, Renews threshold: <%=registry.getNumOfRenewsPerMinThreshold() %>, Renews (last min): <%=registry.getNumOfRenewsInLastMin() %>
<% if (registry.isBelowRenewThresold() == 1) {
if (!registry.isSelfPreservationModeEnabled()) {
%>
RENEWALS ARE LESSER THAN THE THRESHOLD.THE SELF PRESERVATION MODE IS TURNED OFF.THIS MAY NOT PROTECT INSTANCE EXPIRY IN CASE OF NETWORK/OTHER PROBLEMS.
<%} else {%>
EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP WHEN THEY'RE NOT. RENEWALS ARE LESSER THAN THRESHOLD AND HENCE THE INSTANCES ARE NOT BEING EXPIRED JUST TO BE SAFE.
<%} %>
<%} else if (!registry.isSelfPreservationModeEnabled()) {
%>
THE SELF PRESERVATION MODE IS TURNED OFF.THIS MAY NOT PROTECT INSTANCE EXPIRY IN CASE OF NETWORK/OTHER PROBLEMS.
<%}%>
<% if (!registry.shouldAllowAccess(false)) { %>
This server is not allowing registry fetch for local registry.
<% } else if (!registry.shouldAllowAccess(true)) { %>
This server is not allowing registry fetch for remote registry.
<%}%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy