Class ServerErrorHealthCheck
- java.lang.Object
-
- com.codahale.metrics.health.HealthCheck
-
- org.kiwiproject.dropwizard.util.health.ServerErrorHealthCheck
-
public class ServerErrorHealthCheck extends com.codahale.metrics.health.HealthCheck
Checks for Status 5xx responses. This uses a meter which is built into Dropwizard Metrics. It is an approximation since it gives a rate instead of a count for a given time duration. This check uses the 15 minute rate on 5xx responses. Thresholds can be set for warning and critical severity. Warning threshold defaults to 1.0 and Critical defaults to 10.0.
-
-
Constructor Summary
Constructors Constructor Description ServerErrorHealthCheck(com.codahale.metrics.MetricRegistry metrics)
Create the health check with the givenMetricRegistry
, defaulting the warning and critical thresholds.ServerErrorHealthCheck(com.codahale.metrics.MetricRegistry metrics, int warningThreshold, int criticalThreshold)
Create the health check with the givenMetricRegistry
, warning, and critical thresholds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.codahale.metrics.health.HealthCheck.Result
check()
-
-
-
Constructor Detail
-
ServerErrorHealthCheck
public ServerErrorHealthCheck(com.codahale.metrics.MetricRegistry metrics)
Create the health check with the givenMetricRegistry
, defaulting the warning and critical thresholds.- Parameters:
metrics
- the Metrics registry
-
ServerErrorHealthCheck
public ServerErrorHealthCheck(com.codahale.metrics.MetricRegistry metrics, int warningThreshold, int criticalThreshold)
Create the health check with the givenMetricRegistry
, warning, and critical thresholds.- Parameters:
metrics
- the Metrics registrywarningThreshold
- the threshold for a warning severitycriticalThreshold
- the threshold for a critical severity
-
-