Class Metrics.HealthChecker

All Implemented Interfaces:
ExtensionPoint, Runnable
Enclosing class:
Metrics

@Extension public static class Metrics.HealthChecker extends PeriodicWork
Performs the periodic running of health checks and re-indexing of access keys.
  • Constructor Details

    • HealthChecker

      public HealthChecker()
      Default constructor.
  • Method Details

    • getRecurrencePeriod

      public long getRecurrencePeriod()
      Specified by:
      getRecurrencePeriod in class PeriodicWork
    • getHealthCheckDuration

      public com.codahale.metrics.Timer getHealthCheckDuration()
      Gets the Timer that tracks how long the health checks are taking to execute.
      Returns:
      the Timer that tracks how long the health checks are taking to execute.
    • getHealthCheckResults

      @NonNull @WithBridgeMethods(java.util.Map.class) public SortedMap<String,com.codahale.metrics.health.HealthCheck.Result> getHealthCheckResults()
      Gets the most recent results.
      Returns:
      the most recent results.
      See Also:
    • getHealthCheckData

      @CheckForNull public Metrics.HealthCheckData getHealthCheckData()
      Gets the most recent health check data (which includes Metrics.HealthCheckData.getLastModified())
      Returns:
      the most recent health check data or null if the health checks have not run yet.
    • getHealthCheckCount

      public com.codahale.metrics.Gauge<Integer> getHealthCheckCount()
      Gets the Gauge that tracks the number of health checks.
      Returns:
      the Gauge that tracks the number of health checks.
    • getHealthCheckScore

      public com.codahale.metrics.Gauge<Double> getHealthCheckScore()
      Gets the Gauge that tracks the health check score.
      Returns:
      the Gauge that tracks the health check score.
    • doRun

      public final void doRun()
      Schedules this periodic work now in a new thread, if one isn't already running. Copy and paste from AsyncPeriodicWork
      Specified by:
      doRun in class SafeTimerTask
    • dynamicInstallHack

      @Initializer(after=EXTENSIONS_AUGMENTED) @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public static void dynamicInstallHack()