public class Metrics
extends hudson.Plugin
| Modifier and Type | Class and Description |
|---|---|
static class |
Metrics.HealthChecker
Performs the periodic running of health checks and re-indexing of access keys.
|
static class |
Metrics.HeathCheckMetricsProvider
provides the health check related metrics.
|
| Modifier and Type | Field and Description |
|---|---|
static hudson.security.Permission |
HEALTH_CHECK
Permission to run healthchecks from the Codahale Metrics Operations Servlet.
|
static int |
HEALTH_CHECK_INTERVAL_MINS
The frequency with which to run health checks.
|
static hudson.security.PermissionGroup |
PERMISSIONS
Permission group for Metrics related permissions.
|
static hudson.security.Permission |
THREAD_DUMP
Permission to get a thread dump from the Codahale Metrics Operations Servlet.
|
static hudson.security.Permission |
VIEW
Permission to view the Codahale Metrics Operations Servlet.
|
| Constructor and Description |
|---|
Metrics() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkAccessKey(String accessKey)
Checks an access key.
|
static void |
checkAccessKeyHealthCheck(String accessKey)
Checks an access key.
|
static void |
checkAccessKeyMetrics(String accessKey)
Checks an access key.
|
static void |
checkAccessKeyPing(String accessKey)
Checks an access key.
|
static void |
checkAccessKeyThreadDump(String accessKey)
Checks an access key.
|
static org.kohsuke.stapler.HttpResponse |
cors(String accessKey,
org.kohsuke.stapler.HttpResponse resp) |
static com.codahale.metrics.health.HealthCheckRegistry |
healthCheckRegistry()
Returns the
HealthCheckRegistry for the current Jenkins. |
static com.codahale.metrics.MetricRegistry |
metricRegistry()
Returns the
MetricRegistry for the current Jenkins. |
void |
postInitialize() |
static void |
reindexAccessKeys()
Re-indexes all the access keys from the different
MetricsAccessKey.Provider extensions. |
void |
start() |
void |
stop() |
public static final int HEALTH_CHECK_INTERVAL_MINS
public static final hudson.security.PermissionGroup PERMISSIONS
public static final hudson.security.Permission VIEW
public static final hudson.security.Permission THREAD_DUMP
public static final hudson.security.Permission HEALTH_CHECK
@NonNull public static com.codahale.metrics.health.HealthCheckRegistry healthCheckRegistry()
HealthCheckRegistry for the current Jenkins.HealthCheckRegistry for the current JenkinsAssertionError - if there is no Jenkins or Metrics or HealthCheckRegistry@NonNull public static com.codahale.metrics.MetricRegistry metricRegistry()
MetricRegistry for the current Jenkins.MetricRegistry for the current JenkinsAssertionError - if there is no Jenkins or Metrics or MetricRegistrypublic static void checkAccessKey(@CheckForNull
String accessKey)
accessKey - the access key.public static void checkAccessKeyPing(@CheckForNull
String accessKey)
accessKey - the access key.public static void checkAccessKeyThreadDump(@CheckForNull
String accessKey)
accessKey - the access key.public static void checkAccessKeyHealthCheck(@CheckForNull
String accessKey)
accessKey - the access key.public static void checkAccessKeyMetrics(@CheckForNull
String accessKey)
accessKey - the access key.public static org.kohsuke.stapler.HttpResponse cors(@CheckForNull
String accessKey,
org.kohsuke.stapler.HttpResponse resp)
public static void reindexAccessKeys()
MetricsAccessKey.Provider extensions.public void start()
throws Exception
start in class hudson.PluginExceptionpublic void postInitialize()
throws Exception
postInitialize in class hudson.PluginExceptionCopyright © 2004-2014. All Rights Reserved.