java.lang.Object
io.helidon.health.checks.HeapMemoryHealthCheck
- All Implemented Interfaces:
HealthCheck
A health check that verifies whether the server is running out of Java heap space. If heap usage exceeds a
specified threshold, then the health check will fail.
By default, this health check has a threshold of 98.0 (98.0%). If heap usage exceeds this level, then the server is considered to be unhealthy. This default can be modified using the "helidon.health.heapMemory.thresholdPercent" property. The threshold should be set as a percent, such as 50 for 50% or 99 for 99%.
This health check is automatically created and registered through CDI.
This health check can be referred to in properties as heapMemory
. So for example, to exclude this
health check from being exposed, use helidon.health.exclude: heapMemory
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Fluent API builder forHeapMemoryHealthCheck
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Config property key for heap memory threshold.static final double
Default threshold percentage. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a new fluent API builder to configure a new health check.call()
Call a health check.static HeapMemoryHealthCheck
create()
Create a new heap memory health check with default configuration.name()
Name of this health check, used in output when details are requested.path()
Path of this health check, to support single health-check queries.type()
Type of this health check.
-
Field Details
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLDDefault threshold percentage.- See Also:
-
CONFIG_KEY_THRESHOLD_PERCENT
Config property key for heap memory threshold.- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to configure a new health check.- Returns:
- builder instance
-
create
Create a new heap memory health check with default configuration.- Returns:
- a new health check
- See Also:
-
type
Description copied from interface:HealthCheck
Type of this health check.- Specified by:
type
in interfaceHealthCheck
- Returns:
- type, defaults to
HealthCheckType.LIVENESS
-
name
Description copied from interface:HealthCheck
Name of this health check, used in output when details are requested.- Specified by:
name
in interfaceHealthCheck
- Returns:
- name of this health check, defaults to simple class name
-
path
Description copied from interface:HealthCheck
Path of this health check, to support single health-check queries.- Specified by:
path
in interfaceHealthCheck
- Returns:
- path to use, by default returns
HealthCheck.name()
-
call
Description copied from interface:HealthCheck
Call a health check.- Specified by:
call
in interfaceHealthCheck
- Returns:
- health response
-