@Extension public class MetricsRootAction extends Object implements UnprotectedRootAction
Modifier and Type | Class and Description |
---|---|
class |
MetricsRootAction.AccessKeyPseudoservlet
Web binding for the access keys
|
class |
MetricsRootAction.CurrentUserPseudoservlet
Web binding for the current user.
|
class |
MetricsRootAction.Pseudoservlet
A binding of the standard dropwizard metrics servlet into the stapler API
|
static class |
MetricsRootAction.Sampler
Sampler that captures an exponential sample of metrics snapshots.
|
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static TimeUnit |
DURATION_UNIT
The time unit to express durations in, that is all durations are in seconds.
|
static TimeUnit |
RATE_UNIT
The time units to express rates in, that is all rates are events per minute.
|
Constructor and Description |
---|
MetricsRootAction() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doHealthcheck(org.kohsuke.stapler.StaplerRequest req,
String key)
Binds the health checks to the CORS aware URL
/metrics/healthcheck where the metrics access key is
provided in the form field key or an Authorization: Jenkins-Metrics-Key {key} header |
org.kohsuke.stapler.HttpResponse |
doHealthcheckOk(org.kohsuke.stapler.StaplerRequest req)
Condense the health check into one bit of information
for frontend reverse proxies like haproxy.
|
org.kohsuke.stapler.HttpResponse |
doMetrics(org.kohsuke.stapler.StaplerRequest req,
String key)
Binds the metrics to the CORS aware URL
/metrics/metrics where the metrics access key is
provided in the form field key or an Authorization: Jenkins-Metrics-Key {key} header |
org.kohsuke.stapler.HttpResponse |
doMetricsHistory(org.kohsuke.stapler.StaplerRequest req,
String key)
Binds the metrics history to the CORS aware URL
/metrics/metricsHistory where the metrics access key is
provided in the form field key or an Authorization: Jenkins-Metrics-Key {key} header |
org.kohsuke.stapler.HttpResponse |
doPing(org.kohsuke.stapler.StaplerRequest req,
String key)
Binds the ping check to the CORS aware URL
/metrics/ping where the metrics access key is
provided in the form field key or an Authorization: Jenkins-Metrics-Key {key} header |
org.kohsuke.stapler.HttpResponse |
doThreads(org.kohsuke.stapler.StaplerRequest req,
String key)
Binds the thread dump to the CORS aware URL
/metrics/threads where the metrics access key is
provided in the form field key or an Authorization: Jenkins-Metrics-Key {key} header |
Object |
getCurrentUser()
Binds the
MetricsRootAction.Pseudoservlet for the current user to the URL /metrics/currentUser |
String |
getDisplayName() |
Object |
getDynamic(String key)
Binds the
MetricsRootAction.Pseudoservlet for a metric access keys to the URL /metrics/{key} |
String |
getIconFileName() |
String |
getUrlName() |
public static final TimeUnit RATE_UNIT
public static final TimeUnit DURATION_UNIT
public String getIconFileName()
getIconFileName
in interface Action
public String getDisplayName()
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
public String getUrlName()
getUrlName
in interface Action
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Object getDynamic(String key)
MetricsRootAction.Pseudoservlet
for a metric access keys to the URL /metrics/{key}
key
- the key.MetricsRootAction.Pseudoservlet
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Object getCurrentUser()
MetricsRootAction.Pseudoservlet
for the current user to the URL /metrics/currentUser
MetricsRootAction.Pseudoservlet
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doHealthcheck(org.kohsuke.stapler.StaplerRequest req, @QueryParameter(value="key") String key) throws IllegalAccessException
/metrics/healthcheck
where the metrics access key is
provided in the form field key
or an Authorization: Jenkins-Metrics-Key {key}
headerreq
- the requestkey
- the key from the form field.HttpResponse
IllegalAccessException
- if the access attempt is invalid.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doHealthcheckOk(org.kohsuke.stapler.StaplerRequest req)
req
- the request@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doMetrics(org.kohsuke.stapler.StaplerRequest req, @QueryParameter(value="key") String key) throws IllegalAccessException
/metrics/metrics
where the metrics access key is
provided in the form field key
or an Authorization: Jenkins-Metrics-Key {key}
headerreq
- the requestkey
- the key from the form field.HttpResponse
IllegalAccessException
- if the access attempt is invalid.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doMetricsHistory(org.kohsuke.stapler.StaplerRequest req, @QueryParameter(value="key") String key) throws IllegalAccessException
/metrics/metricsHistory
where the metrics access key is
provided in the form field key
or an Authorization: Jenkins-Metrics-Key {key}
headerreq
- the requestkey
- the key from the form field.HttpResponse
IllegalAccessException
- if the access attempt is invalid.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doPing(org.kohsuke.stapler.StaplerRequest req, @QueryParameter(value="key") String key) throws IllegalAccessException
/metrics/ping
where the metrics access key is
provided in the form field key
or an Authorization: Jenkins-Metrics-Key {key}
headerreq
- the requestkey
- the key from the form field.HttpResponse
IllegalAccessException
- if the access attempt is invalid.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doThreads(org.kohsuke.stapler.StaplerRequest req, @QueryParameter(value="key") String key) throws IllegalAccessException
/metrics/threads
where the metrics access key is
provided in the form field key
or an Authorization: Jenkins-Metrics-Key {key}
headerreq
- the requestkey
- the key from the form field.HttpResponse
IllegalAccessException
- if the access attempt is invalid.Copyright © 2016–2019. All rights reserved.