@Extension public static class Metrics.HealthChecker extends PeriodicWork
ExtensionPoint.LegacyInstancesAreScopedToHudson
DAY, HOUR, logger, MIN
Constructor and Description |
---|
HealthChecker()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
doRun()
Schedules this periodic work now in a new thread, if one isn't already running.
|
static void |
dynamicInstallHack() |
com.codahale.metrics.Gauge<Integer> |
getHealthCheckCount()
Gets the
Gauge that tracks the number of health checks. |
Metrics.HealthCheckData |
getHealthCheckData()
Gets the most recent health check data (which includes
Metrics.HealthCheckData.getLastModified() ) |
com.codahale.metrics.Timer |
getHealthCheckDuration()
Gets the
Timer that tracks how long the health checks are taking to execute. |
SortedMap<String,com.codahale.metrics.health.HealthCheck.Result> |
getHealthCheckResults()
Gets the most recent results.
|
com.codahale.metrics.Gauge<Double> |
getHealthCheckScore()
Gets the
Gauge that tracks the health check score. |
long |
getRecurrencePeriod() |
all, getInitialDelay, init
run
cancel, scheduledExecutionTime
public long getRecurrencePeriod()
getRecurrencePeriod
in class PeriodicWork
public com.codahale.metrics.Timer getHealthCheckDuration()
Timer
that tracks how long the health checks are taking to execute.Timer
that tracks how long the health checks are taking to execute.@NonNull @WithBridgeMethods(value=java.util.Map.class) public SortedMap<String,com.codahale.metrics.health.HealthCheck.Result> getHealthCheckResults()
getHealthCheckData()
@CheckForNull public Metrics.HealthCheckData getHealthCheckData()
Metrics.HealthCheckData.getLastModified()
)null
if the health checks have not run yet.public com.codahale.metrics.Gauge<Integer> getHealthCheckCount()
Gauge
that tracks the number of health checks.Gauge
that tracks the number of health checks.public com.codahale.metrics.Gauge<Double> getHealthCheckScore()
Gauge
that tracks the health check score.Gauge
that tracks the health check score.public final void doRun()
doRun
in class SafeTimerTask
@Initializer(after=EXTENSIONS_AUGMENTED) @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public static void dynamicInstallHack()
Copyright © 2016–2019. All rights reserved.