Class DatadogGlobalConfiguration
- java.lang.Object
-
- hudson.model.Descriptor<GlobalConfiguration>
-
- jenkins.model.GlobalConfiguration
-
- org.datadog.jenkins.plugins.datadog.DatadogGlobalConfiguration
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,OnMaster
@Extension public class DatadogGlobalConfiguration extends GlobalConfiguration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
DD_AGENT_HOST
static String
DD_AGENT_PORT
static String
DD_CI_HOSTNAME
static String
DD_TRACE_AGENT_PORT
static String
DD_TRACE_AGENT_URL
static String
DEFAULT_EVENTS
static String
SECURITY_EVENTS
static String
SYSTEM_EVENTS
static String
TARGET_HOST_PROPERTY
static String
TARGET_PORT_PROPERTY
static String
TARGET_TRACE_COLLECTION_PORT_PROPERTY
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description DatadogGlobalConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
Indicates if this builder can be used with all kinds of project types.DatadogClient
createClient()
FormValidation
doCheckAgentConnectivityLogs(String targetHost, String targetLogCollectionPort)
Test the connection to the Logs Collection port in the Datadog Agent.FormValidation
doCheckAgentConnectivityTraces(String targetHost, String targetTraceCollectionPort)
Test the connection to the Traces Collection port in the Datadog Agent.FormValidation
doCheckTargetApiURL(String targetApiURL)
FormValidation
doCheckTargetCredentialsApiKey(Item item, String targetCredentialsApiKey)
Tests the targetCredentialsApiKey field from the configuration screen, to check its validity.FormValidation
doCheckTargetHost(String targetHost)
FormValidation
doCheckTargetLogCollectionPort(String targetLogCollectionPort)
FormValidation
doCheckTargetLogIntakeURL(String targetLogIntakeURL)
FormValidation
doCheckTargetPort(String targetPort)
FormValidation
doCheckTargetTraceCollectionPort(String targetTraceCollectionPort)
FormValidation
doCheckTargetWebhookIntakeURL(String targetWebhookIntakeURL)
FormValidation
doCheckTraceServiceName(String traceServiceName)
ListBoxModel
doFillTargetCredentialsApiKeyItems(Item item, String targetCredentialsApiKey)
Populates the targetCredentialsApiKey field from the configuration screen with all of the valid credentialsFormValidation
doTestConnection(String targetApiKey, String targetCredentialsApiKey, String targetApiURL)
Tests the apiKey field from the configuration screen, to check its' validity.FormValidation
doTestFilteringConfig(boolean emitSecurityEvents, boolean emitSystemEvents, String includeEvents, String excludeEvents)
Checks filtering config for comma-separated list, overlapping include/exclude lists, unrecognizable event names, and redundant inclusion/exclusion.FormValidation
doTestHostname(String hostname)
Tests the hostname field from the configuration screen, to determine if the hostname is of a valid format, according to the RFC 1123.Secret
findSecret(String apiKey, String credentialsApiKey)
Gets the correct Secret object representing the API key used for authentication to Datadog If a Credential is provided, then use the credential, if not, default to the text submissionString
getBlacklist()
Deprecated.replaced bygetExcluded()
String
getCiInstanceName()
Getter function for the traceServiceName global configuration.org.jenkinsci.plugins.plaincredentials.StringCredentials
getCredentialFromId(String credentialId)
Gets the StringCredentials object for the given credential IDString
getDisplayName()
Getter function for a human readable plugin name, used in the configuration screen.boolean
getEnableCiVisibility()
String
getExcluded()
Getter function for the excluded global configuration, containing a comma-separated list of jobs to exclude from monitoring.String
getExcludeEvents()
Getter function for the included global configuration, containing a comma-separated list of events not to send.String
getGlobalJobTags()
Getter function for the globalJobTags global configuration, containing a comma-separated list of jobs and tags that should be applied to themString
getGlobalTagFile()
Gets the globalTagFile set in the job configuration.String
getGlobalTags()
Getter function for the globalTags global configuration, containing a comma-separated list of tags that should be applied everywhere.String
getHostname()
Getter function for the hostname global configuration.String
getIncluded()
Getter function for the included global configuration, containing a comma-separated list of jobs to include for monitoring.String
getIncludeEvents()
Getter function for the included global configuration, containing a comma-separated list of events to send to agent.String
getReportWith()
Getter function for the reportWith global configuration.Secret
getTargetApiKey()
Getter function for the targetApiKey global configuration.String
getTargetApiURL()
Getter function for the targetApiURL global configuration.String
getTargetCredentialsApiKey()
Getter function for the targetCredentialsApiKey global configuration.String
getTargetHost()
Getter function for the targetHost global configuration.Integer
getTargetLogCollectionPort()
Getter function for the targetLogCollectionPort global configuration.String
getTargetLogIntakeURL()
Getter function for the targetLogIntakeURL global configuration.Integer
getTargetPort()
Getter function for the targetPort global configuration.Integer
getTargetTraceCollectionPort()
Getter function for the targetTraceCollectionPort global configuration.String
getTargetWebhookIntakeURL()
Getter function for the targetWebhookIntakeURL global configuration.String
getTraceServiceName()
Deprecated.use getCiInstanceName.Secret
getUsedApiKey()
Getter function for the API key global configuration.String
getWhitelist()
Deprecated.replaced bygetIncluded()
boolean
isApplicable(Class<? extends AbstractProject> aClass)
Indicates if this builder can be used with all kinds of project types.boolean
isCacheBuildRuns()
boolean
isCollectBuildLogs()
boolean
isCollectBuildTraces()
Deprecated.Use isEnabledCiVisibilityboolean
isEmitConfigChangeEvents()
boolean
isEmitSecurityEvents()
boolean
isEmitSystemEvents()
boolean
isRefreshDogstatsdClient()
boolean
isRetryLogs()
Deprecated.This method is here to ensure backward compatibilityboolean
isUseAwsInstanceHostname()
void
loadEnvVariables()
void
onStartup()
void
setBlacklist(String jobs)
Deprecated.replaced bysetExcluded(String)
void
setCacheBuildRuns(boolean cacheBuildRuns)
Set the checkbox in the UI, used for Jenkins data bindingvoid
setCiInstanceName(String ciInstanceName)
Setter function for the traceServiceName global configuration.void
setCollectBuildLogs(boolean collectBuildLogs)
Set the checkbox in the UI, used for Jenkins data bindingvoid
setCollectBuildTraces(boolean collectBuildTraces)
Deprecated.Use setEnableCiVisibilityvoid
setEmitConfigChangeEvents(boolean emitConfigChangeEvents)
Used for CasC accepting a comma-separated string of events.void
setEmitSecurityEvents(boolean emitSecurityEvents)
Set the checkbox in the UI, used for Jenkins data bindingvoid
setEmitSystemEvents(boolean emitSystemEvents)
Set the checkbox in the UI, used for Jenkins data bindingvoid
setEnableCiVisibility(boolean enableCiVisibility)
Set the checkbox in the UI, used for Jenkins data binding to enable CI Visibilityvoid
setExcluded(String jobs)
Setter function for the excluded jobs global configuration, accepting a comma-separated string of jobs.void
setExcludeEvents(String events)
Setter function for the included global configuration, accepting a comma-separated string of events.void
setGlobalJobTags(String globalJobTags)
Setter function for the globalJobTags global configuration, accepting a comma-separated string of jobs and tags.void
setGlobalTagFile(String globalTagFile)
Setter function for the globalFile global configuration, accepting a comma-separated string of tags.void
setGlobalTags(String globalTags)
Setter function for the globalTags global configuration, accepting a comma-separated string of tags.void
setHostname(String hostname)
Setter function for the hostname global configuration.void
setIncluded(String jobs)
Setter function for the includedd global configuration, accepting a comma-separated string of jobs.void
setIncludeEvents(String events)
Setter function for the included global configuration, accepting a comma-separated string of events.void
setRefreshDogstatsdClient(boolean refreshDogstatsdClient)
Set the checkbox in the UI, used for Jenkins data bindingvoid
setReportWith(String reportWith)
Setter function for the reportWith global configuration.void
setRetryLogs(boolean retryLogs)
Deprecated.This method is here to ensure backward compatibilityvoid
setTargetApiKey(String targetApiKey)
Setter function for the apiKey global configuration.void
setTargetApiURL(String targetApiURL)
Setter function for the targetApiURL global configuration.void
setTargetCredentialsApiKey(String targetCredentialsApiKey)
Setter function for the credentials apiKey global configuration.void
setTargetHost(String targetHost)
Setter function for the targetHost global configuration.void
setTargetLogCollectionPort(Integer targetLogCollectionPort)
Setter function for the targetLogCollectionPort global configuration.void
setTargetLogIntakeURL(String targetLogIntakeURL)
Setter function for the targetLogIntakeURL global configuration.void
setTargetPort(Integer targetPort)
Setter function for the targetPort global configuration.void
setTargetTraceCollectionPort(Integer targetTraceCollectionPort)
Setter function for the targetLogCollectionPort global configuration.void
setTargetWebhookIntakeURL(String targetWebhookIntakeURL)
Setter function for the targetWebhookIntakeURL global configuration.void
setTraceServiceName(String traceServiceName)
Deprecated.Use setCiInstanceName.void
setUseAwsInstanceHostname(boolean useAwsInstanceHostname)
Set the checkbox in the UI, used for Jenkins data bindingvoid
setUsedApiKey(Secret usedApiKey)
Setter function for the API key global configuration..void
setWhitelist(String jobs)
Deprecated.replaced bysetIncluded(String)
static boolean
validatePort(String targetPort)
static boolean
validateURL(String targetURL)
-
Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Field Detail
-
SYSTEM_EVENTS
public static final String SYSTEM_EVENTS
- See Also:
- Constant Field Values
-
SECURITY_EVENTS
public static final String SECURITY_EVENTS
- See Also:
- Constant Field Values
-
DEFAULT_EVENTS
public static final String DEFAULT_EVENTS
- See Also:
- Constant Field Values
-
DD_AGENT_HOST
public static final String DD_AGENT_HOST
- See Also:
- Constant Field Values
-
DD_AGENT_PORT
public static final String DD_AGENT_PORT
- See Also:
- Constant Field Values
-
DD_TRACE_AGENT_PORT
public static final String DD_TRACE_AGENT_PORT
- See Also:
- Constant Field Values
-
DD_TRACE_AGENT_URL
public static final String DD_TRACE_AGENT_URL
- See Also:
- Constant Field Values
-
DD_CI_HOSTNAME
public static final String DD_CI_HOSTNAME
- See Also:
- Constant Field Values
-
TARGET_HOST_PROPERTY
public static final String TARGET_HOST_PROPERTY
- See Also:
- Constant Field Values
-
TARGET_PORT_PROPERTY
public static final String TARGET_PORT_PROPERTY
- See Also:
- Constant Field Values
-
TARGET_TRACE_COLLECTION_PORT_PROPERTY
public static final String TARGET_TRACE_COLLECTION_PORT_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
onStartup
@Initializer(after=SYSTEM_CONFIG_LOADED) public void onStartup()
-
loadEnvVariables
public void loadEnvVariables()
-
doCheckAgentConnectivityLogs
public FormValidation doCheckAgentConnectivityLogs(@QueryParameter("targetHost") String targetHost, @QueryParameter("targetLogCollectionPort") String targetLogCollectionPort)
Test the connection to the Logs Collection port in the Datadog Agent.- Parameters:
targetHost
- - The Datadog Agent hosttargetLogCollectionPort
- - The Logs Collection port used to report logs in the Datadog Agent- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doCheckAgentConnectivityTraces
public FormValidation doCheckAgentConnectivityTraces(@QueryParameter("targetHost") String targetHost, @QueryParameter("targetTraceCollectionPort") String targetTraceCollectionPort)
Test the connection to the Traces Collection port in the Datadog Agent.- Parameters:
targetHost
- - The Datadog Agent hosttargetTraceCollectionPort
- - The Traces Collection port used to report logs in the Datadog Agent- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
getCredentialFromId
public org.jenkinsci.plugins.plaincredentials.StringCredentials getCredentialFromId(String credentialId)
Gets the StringCredentials object for the given credential ID- Parameters:
credentialId
- - The Id of the credential to get- Returns:
- a StringCredentials object
-
findSecret
public Secret findSecret(String apiKey, String credentialsApiKey)
Gets the correct Secret object representing the API key used for authentication to Datadog If a Credential is provided, then use the credential, if not, default to the text submission- Parameters:
apiKey
- - The text API key the user submittedcredentialsApiKey
- - The Id of the credential the user submitted- Returns:
- a Secret object representing the API key used for authentication to Datadog
-
doTestConnection
public FormValidation doTestConnection(@QueryParameter("targetApiKey") String targetApiKey, @QueryParameter("targetCredentialsApiKey") String targetCredentialsApiKey, @QueryParameter("targetApiURL") String targetApiURL) throws IOException, javax.servlet.ServletException
Tests the apiKey field from the configuration screen, to check its' validity. It is used in the config.jelly resource file. See method="testConnection"- Parameters:
targetApiURL
- - The API Url to validate the apikey.targetApiKey
- - A String containing the apiKey submitted from the form on the configuration screen, which will be used to authenticate a request to the Datadog API.targetCredentialsApiKey
- - A String containing the API key as a credential, if it is not specified, try the connection with the targetApiKey- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
- Throws:
IOException
- if there is an input/output exception.javax.servlet.ServletException
- if there is a servlet exception.
-
doFillTargetCredentialsApiKeyItems
public ListBoxModel doFillTargetCredentialsApiKeyItems(@AncestorInPath Item item, @QueryParameter("targetCredentialsApiKey") String targetCredentialsApiKey)
Populates the targetCredentialsApiKey field from the configuration screen with all of the valid credentials- Parameters:
item
- - The context within which to list available credentialstargetCredentialsApiKey
- - A String containing the API key as a credential- Returns:
- a ListBoxModel object used to display all of the available credentials.
-
doTestFilteringConfig
public FormValidation doTestFilteringConfig(@QueryParameter("emitSecurityEvents") boolean emitSecurityEvents, @QueryParameter("emitSystemEvents") boolean emitSystemEvents, @QueryParameter("includeEvents") String includeEvents, @QueryParameter("excludeEvents") String excludeEvents)
Checks filtering config for comma-separated list, overlapping include/exclude lists, unrecognizable event names, and redundant inclusion/exclusion.- Parameters:
emitSecurityEvents
- toggle to send security eventsemitSystemEvents
- toggle to send system eventsincludeEvents
- string of included events list (comma-separated)excludeEvents
- string of excluded events list (comma-separated)- Returns:
- FormValidation.error() if not formatted correctly or overlapping lists, FormValidation.warning() for redundant config, and FormValidation.ok() for all else
-
doCheckTargetCredentialsApiKey
public FormValidation doCheckTargetCredentialsApiKey(@AncestorInPath Item item, @QueryParameter("targetCredentialsApiKey") String targetCredentialsApiKey)
Tests the targetCredentialsApiKey field from the configuration screen, to check its validity.- Parameters:
item
- - The context within which to list available credentials.targetCredentialsApiKey
- - A String containing the API key as a credential- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doTestHostname
public FormValidation doTestHostname(@QueryParameter("hostname") String hostname)
Tests the hostname field from the configuration screen, to determine if the hostname is of a valid format, according to the RFC 1123. It is used in the config.jelly resource file. See method="testHostname"- Parameters:
hostname
- - A String containing the hostname submitted from the form on the configuration screen, which will be used to authenticate a request to the Datadog API.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doCheckTargetApiURL
public FormValidation doCheckTargetApiURL(@QueryParameter("targetApiURL") String targetApiURL)
- Parameters:
targetApiURL
- - The API URL which the plugin will report to.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doCheckTargetLogIntakeURL
public FormValidation doCheckTargetLogIntakeURL(@QueryParameter("targetLogIntakeURL") String targetLogIntakeURL)
- Parameters:
targetLogIntakeURL
- - The Log Intake URL which the plugin will report to.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doCheckTargetWebhookIntakeURL
public FormValidation doCheckTargetWebhookIntakeURL(@QueryParameter("targetWebhookIntakeURL") String targetWebhookIntakeURL)
- Parameters:
targetWebhookIntakeURL
- - The Webhook Intake URL which the plugin will report to.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
validateURL
public static boolean validateURL(String targetURL)
-
doCheckTargetHost
public FormValidation doCheckTargetHost(@QueryParameter("targetHost") String targetHost)
- Parameters:
targetHost
- - The dogStatsD Host which the plugin will report to.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
validatePort
public static boolean validatePort(String targetPort)
-
doCheckTargetPort
public FormValidation doCheckTargetPort(@QueryParameter("targetPort") String targetPort)
- Parameters:
targetPort
- - The dogStatsD Port which the plugin will report to.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doCheckTargetLogCollectionPort
public FormValidation doCheckTargetLogCollectionPort(@QueryParameter("targetLogCollectionPort") String targetLogCollectionPort)
- Parameters:
targetLogCollectionPort
- - The Log Collection Port which the plugin will report to.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doCheckTargetTraceCollectionPort
public FormValidation doCheckTargetTraceCollectionPort(@QueryParameter("targetTraceCollectionPort") String targetTraceCollectionPort)
- Parameters:
targetTraceCollectionPort
- - The Trace Collection Port which the plugin will report to.- Returns:
- a FormValidation object used to display a message to the user on the configuration screen.
-
doCheckTraceServiceName
public FormValidation doCheckTraceServiceName(@QueryParameter("traceServiceName") String traceServiceName)
-
isApplicable
public boolean isApplicable(Class<? extends AbstractProject> aClass)
Indicates if this builder can be used with all kinds of project types.- Parameters:
aClass
- - An extension of the AbstractProject class representing a specific type of project.- Returns:
- a boolean signifying whether or not a builder can be used with a specific type of project.
-
getDisplayName
public String getDisplayName()
Getter function for a human readable plugin name, used in the configuration screen.- Overrides:
getDisplayName
in classDescriptor<GlobalConfiguration>
- Returns:
- a String containing the human readable display name for this plugin.
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
Indicates if this builder can be used with all kinds of project types.- Overrides:
configure
in classGlobalConfiguration
- Parameters:
req
- - A StaplerRequest objectformData
- - A JSONObject containing the submitted form data from the configuration screen.- Returns:
- a boolean signifying the success or failure of configuration.
- Throws:
Descriptor.FormException
- if the formData is invalid.
-
createClient
@Nullable public DatadogClient createClient()
-
getReportWith
public String getReportWith()
Getter function for the reportWith global configuration.- Returns:
- a String containing the reportWith global configuration.
-
setReportWith
@DataBoundSetter public void setReportWith(String reportWith)
Setter function for the reportWith global configuration.- Parameters:
reportWith
- = A string containing the reportWith global configuration.
-
getTargetApiURL
public String getTargetApiURL()
Getter function for the targetApiURL global configuration.- Returns:
- a String containing the targetApiURL global configuration.
-
setTargetApiURL
@DataBoundSetter public void setTargetApiURL(String targetApiURL)
Setter function for the targetApiURL global configuration.- Parameters:
targetApiURL
- = A string containing the DataDog API URL
-
setTargetLogIntakeURL
@DataBoundSetter public void setTargetLogIntakeURL(String targetLogIntakeURL)
Setter function for the targetLogIntakeURL global configuration.- Parameters:
targetLogIntakeURL
- = A string containing the DataDog Log Intake URL
-
getTargetLogIntakeURL
public String getTargetLogIntakeURL()
Getter function for the targetLogIntakeURL global configuration.- Returns:
- a String containing the targetLogIntakeURL global configuration.
-
setTargetWebhookIntakeURL
@DataBoundSetter public void setTargetWebhookIntakeURL(String targetWebhookIntakeURL)
Setter function for the targetWebhookIntakeURL global configuration.- Parameters:
targetWebhookIntakeURL
- = A string containing the DataDog Webhook Intake URL
-
getTargetWebhookIntakeURL
public String getTargetWebhookIntakeURL()
Getter function for the targetWebhookIntakeURL global configuration.- Returns:
- a String containing the targetWebhookIntakeURL global configuration.
-
getTargetApiKey
public Secret getTargetApiKey()
Getter function for the targetApiKey global configuration.- Returns:
- a Secret containing the targetApiKey global configuration.
-
setTargetApiKey
@DataBoundSetter public void setTargetApiKey(String targetApiKey)
Setter function for the apiKey global configuration.- Parameters:
targetApiKey
- = A string containing the plaintext representation of a DataDog API Key
-
getUsedApiKey
public Secret getUsedApiKey()
Getter function for the API key global configuration.- Returns:
- a Secret containing the usedApiKey global configuration.
-
setUsedApiKey
@DataBoundSetter public void setUsedApiKey(Secret usedApiKey)
Setter function for the API key global configuration..- Parameters:
usedApiKey
- = A Secret containing the DataDog API Key
-
getTargetCredentialsApiKey
public String getTargetCredentialsApiKey()
Getter function for the targetCredentialsApiKey global configuration.- Returns:
- a String containing the ID of the targetCredentialsApiKey global configuration.
-
setTargetCredentialsApiKey
@DataBoundSetter public void setTargetCredentialsApiKey(String targetCredentialsApiKey)
Setter function for the credentials apiKey global configuration.- Parameters:
targetCredentialsApiKey
- = A string containing the plaintext representation of a DataDog API Key
-
getTargetHost
public String getTargetHost()
Getter function for the targetHost global configuration.- Returns:
- a String containing the targetHost global configuration.
-
setTargetHost
@DataBoundSetter public void setTargetHost(String targetHost)
Setter function for the targetHost global configuration.- Parameters:
targetHost
- = A string containing the DogStatsD Host
-
getTargetPort
public Integer getTargetPort()
Getter function for the targetPort global configuration.- Returns:
- a Integer containing the targetPort global configuration.
-
setTargetPort
@DataBoundSetter public void setTargetPort(Integer targetPort)
Setter function for the targetPort global configuration.- Parameters:
targetPort
- = A string containing the DogStatsD Port
-
getTargetLogCollectionPort
public Integer getTargetLogCollectionPort()
Getter function for the targetLogCollectionPort global configuration.- Returns:
- a Integer containing the targetLogCollectionPort global configuration.
-
setTargetLogCollectionPort
@DataBoundSetter public void setTargetLogCollectionPort(Integer targetLogCollectionPort)
Setter function for the targetLogCollectionPort global configuration.- Parameters:
targetLogCollectionPort
- = A string containing the Log Collection Port
-
getTargetTraceCollectionPort
public Integer getTargetTraceCollectionPort()
Getter function for the targetTraceCollectionPort global configuration.- Returns:
- a Integer containing the targetTraceCollectionPort global configuration.
-
setTargetTraceCollectionPort
@DataBoundSetter public void setTargetTraceCollectionPort(Integer targetTraceCollectionPort)
Setter function for the targetLogCollectionPort global configuration.- Parameters:
targetTraceCollectionPort
- = A string containing the Trace Collection Port
-
getTraceServiceName
@Deprecated public String getTraceServiceName()
Deprecated.use getCiInstanceName.Getter function for the traceServiceName global configuration.- Returns:
- a String containing the traceServiceName global configuration.
-
setTraceServiceName
@Deprecated @DataBoundSetter public void setTraceServiceName(String traceServiceName)
Deprecated.Use setCiInstanceName.Setter function for the traceServiceName global configuration.- Parameters:
traceServiceName
- = A string containing the Trace Service Name
-
getCiInstanceName
public String getCiInstanceName()
Getter function for the traceServiceName global configuration.- Returns:
- a String containing the traceServiceName global configuration.
-
setCiInstanceName
public void setCiInstanceName(String ciInstanceName)
Setter function for the traceServiceName global configuration.- Parameters:
ciInstanceName
- = A string containing the CI Instance Name
-
getHostname
public String getHostname()
Getter function for the hostname global configuration.- Returns:
- a String containing the hostname global configuration.
-
setHostname
@DataBoundSetter public void setHostname(String hostname)
Setter function for the hostname global configuration.- Parameters:
hostname
- - A String containing the hostname of the Jenkins host.
-
getBlacklist
@Deprecated public String getBlacklist()
Deprecated.replaced bygetExcluded()
- Returns:
- a String array containing the excluded global configuration.
-
getExcluded
public String getExcluded()
Getter function for the excluded global configuration, containing a comma-separated list of jobs to exclude from monitoring.- Returns:
- a String array containing the excluded global configuration.
-
setBlacklist
@Deprecated @DataBoundSetter public void setBlacklist(String jobs)
Deprecated.replaced bysetExcluded(String)
- Parameters:
jobs
- - a comma-separated list of jobs to exclude from monitoring.
-
setExcluded
@DataBoundSetter public void setExcluded(String jobs)
Setter function for the excluded jobs global configuration, accepting a comma-separated string of jobs.- Parameters:
jobs
- - a comma-separated list of jobs to exclude from monitoring.
-
getWhitelist
@Deprecated public String getWhitelist()
Deprecated.replaced bygetIncluded()
- Returns:
- a String array containing the included global configuration.
-
getIncluded
public String getIncluded()
Getter function for the included global configuration, containing a comma-separated list of jobs to include for monitoring.- Returns:
- a String array containing the included global configuration.
-
setWhitelist
@Deprecated @DataBoundSetter public void setWhitelist(String jobs)
Deprecated.replaced bysetIncluded(String)
- Parameters:
jobs
- - a comma-separated list of jobs to include for monitoring.
-
setIncluded
@DataBoundSetter public void setIncluded(String jobs)
Setter function for the includedd global configuration, accepting a comma-separated string of jobs.- Parameters:
jobs
- - a comma-separated list of jobs to include for monitoring.
-
isEmitConfigChangeEvents
public boolean isEmitConfigChangeEvents()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to emit Config Change events.
-
setEmitConfigChangeEvents
@DataBoundSetter public void setEmitConfigChangeEvents(boolean emitConfigChangeEvents)
Used for CasC accepting a comma-separated string of events.- Parameters:
emitConfigChangeEvents
- - The checkbox status (checked/unchecked)
-
getGlobalTagFile
public String getGlobalTagFile()
Gets the globalTagFile set in the job configuration.- Returns:
- a String representing the relative path to a globalTagFile
-
setGlobalTagFile
@DataBoundSetter public void setGlobalTagFile(String globalTagFile)
Setter function for the globalFile global configuration, accepting a comma-separated string of tags.- Parameters:
globalTagFile
- - a comma-separated list of tags.
-
getGlobalTags
public String getGlobalTags()
Getter function for the globalTags global configuration, containing a comma-separated list of tags that should be applied everywhere.- Returns:
- a String array containing the globalTags global configuration
-
setGlobalTags
@DataBoundSetter public void setGlobalTags(String globalTags)
Setter function for the globalTags global configuration, accepting a comma-separated string of tags.- Parameters:
globalTags
- - a comma-separated list of tags.
-
getGlobalJobTags
public String getGlobalJobTags()
Getter function for the globalJobTags global configuration, containing a comma-separated list of jobs and tags that should be applied to them- Returns:
- a String array containing the globalJobTags global configuration.
-
setGlobalJobTags
@DataBoundSetter public void setGlobalJobTags(String globalJobTags)
Setter function for the globalJobTags global configuration, accepting a comma-separated string of jobs and tags.- Parameters:
globalJobTags
- - a comma-separated list of jobs to include from monitoring.
-
isRetryLogs
@Deprecated public boolean isRetryLogs()
Deprecated.This method is here to ensure backward compatibility
-
setRetryLogs
@Deprecated @DataBoundSetter public void setRetryLogs(boolean retryLogs)
Deprecated.This method is here to ensure backward compatibility
-
isRefreshDogstatsdClient
public boolean isRefreshDogstatsdClient()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to refresh the dogstatsd client
-
setRefreshDogstatsdClient
@DataBoundSetter public void setRefreshDogstatsdClient(boolean refreshDogstatsdClient)
Set the checkbox in the UI, used for Jenkins data binding- Parameters:
refreshDogstatsdClient
- - The checkbox status (checked/unchecked)
-
isCacheBuildRuns
public boolean isCacheBuildRuns()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to cache build runs
-
setCacheBuildRuns
@DataBoundSetter public void setCacheBuildRuns(boolean cacheBuildRuns)
Set the checkbox in the UI, used for Jenkins data binding- Parameters:
cacheBuildRuns
- - The checkbox status (checked/unchecked)
-
isUseAwsInstanceHostname
public boolean isUseAwsInstanceHostname()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to use AWS instance as hostname
-
setUseAwsInstanceHostname
@DataBoundSetter public void setUseAwsInstanceHostname(boolean useAwsInstanceHostname)
Set the checkbox in the UI, used for Jenkins data binding- Parameters:
useAwsInstanceHostname
- - The checkbox status (checked/unchecked)
-
isEmitSecurityEvents
public boolean isEmitSecurityEvents()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to emit Security related events.
-
setEmitSecurityEvents
@DataBoundSetter public void setEmitSecurityEvents(boolean emitSecurityEvents)
Set the checkbox in the UI, used for Jenkins data binding- Parameters:
emitSecurityEvents
- - The checkbox status (checked/unchecked)
-
isEmitSystemEvents
public boolean isEmitSystemEvents()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to emit System related events.
-
setEmitSystemEvents
@DataBoundSetter public void setEmitSystemEvents(boolean emitSystemEvents)
Set the checkbox in the UI, used for Jenkins data binding- Parameters:
emitSystemEvents
- - The checkbox status (checked/unchecked)
-
setIncludeEvents
@DataBoundSetter public void setIncludeEvents(String events) throws InvalidAttributeValueException
Setter function for the included global configuration, accepting a comma-separated string of events.- Parameters:
events
- - a comma-separated list of events to include for sending to agent.- Throws:
InvalidAttributeValueException
-
getIncludeEvents
public String getIncludeEvents()
Getter function for the included global configuration, containing a comma-separated list of events to send to agent.- Returns:
- a String array containing the events included global configuration.
-
setExcludeEvents
@DataBoundSetter public void setExcludeEvents(String events) throws InvalidAttributeValueException
Setter function for the included global configuration, accepting a comma-separated string of events.- Parameters:
events
- - a comma-separated list of events to exclude for sending to agent.- Throws:
InvalidAttributeValueException
-
getExcludeEvents
public String getExcludeEvents()
Getter function for the included global configuration, containing a comma-separated list of events not to send.- Returns:
- a String array containing the events included global configuration.
-
isCollectBuildLogs
public boolean isCollectBuildLogs()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to collect logs.
-
setCollectBuildLogs
@DataBoundSetter public void setCollectBuildLogs(boolean collectBuildLogs)
Set the checkbox in the UI, used for Jenkins data binding- Parameters:
collectBuildLogs
- - The checkbox status (checked/unchecked)
-
isCollectBuildTraces
@Deprecated public boolean isCollectBuildTraces()
Deprecated.Use isEnabledCiVisibility- Returns:
- - A
Boolean
indicating if the user has configured Datadog to collect traces.
-
setCollectBuildTraces
@DataBoundSetter @Deprecated public void setCollectBuildTraces(boolean collectBuildTraces)
Deprecated.Use setEnableCiVisibilitySet the checkbox in the UI, used for Jenkins data binding- Parameters:
collectBuildTraces
- - The checkbox status (checked/unchecked)
-
getEnableCiVisibility
public boolean getEnableCiVisibility()
- Returns:
- - A
Boolean
indicating if the user has configured Datadog to enable CI Visibility.
-
setEnableCiVisibility
@DataBoundSetter public void setEnableCiVisibility(boolean enableCiVisibility)
Set the checkbox in the UI, used for Jenkins data binding to enable CI Visibility- Parameters:
enableCiVisibility
- - The checkbox status (checked/unchecked)
-
-