@Extension public class CortexMetricsGlobalConfig extends GlobalConfiguration
| Modifier and Type | Class and Description |
|---|---|
static class |
CortexMetricsGlobalConfig.GlobalCortexMetricsConfigProvider
Provider for global configuration.
|
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAMESPACE |
clazz| Constructor and Description |
|---|
CortexMetricsGlobalConfig()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json) |
static CortexMetricsGlobalConfig |
get()
Retrieve the global configuration instance.
|
Secret |
getBearerToken()
Get the bearer token used to authenticate to Cortex.
|
String |
getNamespace()
Get the namespace for metric names (the first token in each metric sent to Cortex).
|
String |
getUrl()
Get the URL for publishing metrics to Cortex.
|
void |
setBearerToken(Secret bearerToken)
Set the bearer token used to authenticate to Cortex.
|
void |
setNamespace(String namespace)
Set the namespace for metric names.
|
void |
setUrl(String url)
Set the URL for publishing metrics to Cortex.
|
all, getDescriptor, getGlobalConfigPageaddHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMappublic static final String DEFAULT_NAMESPACE
public String getUrl()
@DataBoundSetter public void setUrl(String url)
url - the Cortex write URLpublic Secret getBearerToken()
@DataBoundSetter public void setBearerToken(Secret bearerToken)
bearerToken - the bearer token for authenticationpublic String getNamespace()
@DataBoundSetter public void setNamespace(String namespace)
namespace - the namespacepublic static CortexMetricsGlobalConfig get()
public boolean configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json)
throws Descriptor.FormException
configure in class GlobalConfigurationDescriptor.FormExceptionCopyright © 2016–2021. All rights reserved.