Package fish.payara.healthcheck.mphealth
Class MicroProfileHealthChecker
- java.lang.Object
-
- fish.payara.nucleus.healthcheck.preliminary.BaseHealthCheck<HealthCheckTimeoutExecutionOptions,MicroProfileHealthCheckerConfiguration>
-
- fish.payara.healthcheck.mphealth.MicroProfileHealthChecker
-
- All Implemented Interfaces:
fish.payara.monitoring.collect.MonitoringDataSource,fish.payara.monitoring.collect.MonitoringWatchSource,HealthCheckConstants,org.glassfish.hk2.api.PostConstruct
@Service(name="healthcheck-mp") @RunLevel(10) public class MicroProfileHealthChecker extends BaseHealthCheck<HealthCheckTimeoutExecutionOptions,MicroProfileHealthCheckerConfiguration> implements org.glassfish.hk2.api.PostConstruct, fish.payara.monitoring.collect.MonitoringDataSource, fish.payara.monitoring.collect.MonitoringWatchSource
Health Check service that pokes MicroProfile Healthcheck endpoints of instances in the current domain to see if they are responsive- Since:
- 5.184
- Author:
- jonathan coustick
-
-
Field Summary
-
Fields inherited from class fish.payara.nucleus.healthcheck.preliminary.BaseHealthCheck
checkerType, healthCheckService, options
-
Fields inherited from interface fish.payara.nucleus.healthcheck.HealthCheckConstants
DEFAULT_ADD_TO_MICROPROFILE_HEALTH, DEFAULT_CONNECTION_POOL_NAME, DEFAULT_CPU_USAGE_NAME, DEFAULT_ENABLED, DEFAULT_GARBAGE_COLLECTOR_NAME, DEFAULT_HEAP_MEMORY_USAGE_NAME, DEFAULT_HOGGING_THREADS_NAME, DEFAULT_MACHINE_MEMORY_USAGE_NAME, DEFAULT_MICROPROFILE_HEALTHCHECK_NAME, DEFAULT_MICROPROFILE_METRICS_NAME, DEFAULT_RETRY_COUNT, DEFAULT_STUCK_THREAD_NAME, DEFAULT_THRESHOLD_PERCENTAGE, DEFAULT_TIME, DEFAULT_TIMEOUT, DEFAULT_UNIT, FIVE_MIN, OLD_CONCURRENTMARKSWEEP, OLD_G1GC, OLD_MARK_SWEEP_COMPACT, OLD_PS_MARKSWEEP, ONE_GB, ONE_KB, ONE_MB, ONE_MIN, ONE_SEC, THRESHOLD_CRITICAL, THRESHOLD_DEFAULTVAL_CRITICAL, THRESHOLD_DEFAULTVAL_GOOD, THRESHOLD_DEFAULTVAL_WARNING, THRESHOLD_GOOD, THRESHOLD_WARNING, YOUNG_COPY, YOUNG_G1GC, YOUNG_PARNEW, YOUNG_PS_SCAVENGE
-
-
Constructor Summary
Constructors Constructor Description MicroProfileHealthChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollect(fish.payara.monitoring.collect.MonitoringDataCollector collector)The idea is that every 12 seconds this data is collected.voidcollect(fish.payara.monitoring.collect.MonitoringWatchCollector collector)HealthCheckTimeoutExecutionOptionsconstructOptions(MicroProfileHealthCheckerConfiguration c)protected HealthCheckResultdoCheckInternal()protected StringgetDescription()The key for a human-friendly description of the healthcheckvoidpostConstruct()-
Methods inherited from class fish.payara.nucleus.healthcheck.preliminary.BaseHealthCheck
asTimeUnit, constructBaseOptions, decideOnStatusWithDuration, doCheck, getCheckerType, getChecksDone, getChecksFailed, getMostRecentCumulativeStatus, getMostRecentResult, getOptions, isEnabled, isInProgress, isReady, postConstruct, prettyPrintBytes, prettyPrintStackTrace, resolveDescription, sendNotification, setOptions
-
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
doCheckInternal
protected HealthCheckResult doCheckInternal()
- Specified by:
doCheckInternalin classBaseHealthCheck<HealthCheckTimeoutExecutionOptions,MicroProfileHealthCheckerConfiguration>
-
collect
public void collect(fish.payara.monitoring.collect.MonitoringWatchCollector collector)
- Specified by:
collectin interfacefish.payara.monitoring.collect.MonitoringWatchSource
-
collect
public void collect(fish.payara.monitoring.collect.MonitoringDataCollector collector)
The idea is that every 12 seconds this data is collected. This triggers the tasks. If there are tasks from 12 seconds ago these should be done otherwise they are causing a "immediate" timeout as next collection is 12 seconds later. So from the point of view of the collector results are available "immediately" while the asynchronous tasks had 12 seconds to finish.- Specified by:
collectin interfacefish.payara.monitoring.collect.MonitoringDataSource
-
constructOptions
public HealthCheckTimeoutExecutionOptions constructOptions(MicroProfileHealthCheckerConfiguration c)
- Specified by:
constructOptionsin classBaseHealthCheck<HealthCheckTimeoutExecutionOptions,MicroProfileHealthCheckerConfiguration>
-
getDescription
protected String getDescription()
Description copied from class:BaseHealthCheckThe key for a human-friendly description of the healthcheck- Specified by:
getDescriptionin classBaseHealthCheck<HealthCheckTimeoutExecutionOptions,MicroProfileHealthCheckerConfiguration>- Returns:
-
-