Package io.jenkins.plugins.onmonit
Class ONMonitConfig
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.onmonit.ONMonitConfig
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,Loadable
,OnMaster
@Extension(dynamicLoadable=YES)
@Symbol("onMonitConfig")
public final class ONMonitConfig
extends GlobalConfiguration
Global configuration for the ONMonit plug-in, as shown on the Jenkins Configure System page.
-
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 inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondoCheckDownloadBaseUrl
(String downloadBaseUrl) doCheckGrafanaDashboard
(String grafanaDashboard) static ONMonitConfig
get()
Get the current ONMonit global configuration.Get the format for displaying the elapsed time.Get the URL for a Grafana dashboard which can display the metrics gathered by ONMonit.Get the default additional options for the node_exporter process.Get the default additional options for the otel-contrib process.Get the configuration template for the otel-contrib process.void
setDownloadBaseUrl
(String downloadBaseUrl) Set a base URL from under which node_exporter and otel-contrib binaries can be downloaded.void
setGrafanaDashboard
(String grafanaDashboard) Set the URL for a Grafana dashboard which can display the metrics gathered by ONMonit.void
setNeDefaultAdditionalOptions
(String defaultAdditionalOptions) Set the default additional options for the node_exporter process.void
setOcDefaultAdditionalOptions
(String defaultAdditionalOptions) Set the default additional options for the otel-contrib process.void
setOtelConfigTemplate
(String otelConfigTemplate) Set a configuration template for the otel-contrib process.Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, configure, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, 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, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Field Details
-
ICON_CLASS_GRAFANA
- See Also:
-
ICON_CLASS_OTEL
- See Also:
-
-
Constructor Details
-
ONMonitConfig
public ONMonitConfig()Constructor.
-
-
Method Details
-
get
Get the current ONMonit global configuration.- Returns:
- the ONMonit configuration, or
null
if Jenkins has been shut down
-
getGrafanaDashboard
Get the URL for a Grafana dashboard which can display the metrics gathered by ONMonit.- Returns:
- the Grafana dashboard URL
-
setGrafanaDashboard
Set the URL for a Grafana dashboard which can display the metrics gathered by ONMonit.- Parameters:
grafanaDashboard
- the Grafana dashboard URL
-
doCheckGrafanaDashboard
@POST public FormValidation doCheckGrafanaDashboard(@QueryParameter String grafanaDashboard) throws IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
getDownloadBaseUrl
Get the format for displaying the elapsed time.- Returns:
- the elapsed time format
-
setDownloadBaseUrl
Set a base URL from under which node_exporter and otel-contrib binaries can be downloaded.- Parameters:
downloadBaseUrl
- the URL
-
doCheckDownloadBaseUrl
@POST public FormValidation doCheckDownloadBaseUrl(@QueryParameter String downloadBaseUrl) throws IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
getNeDefaultAdditionalOptions
Get the default additional options for the node_exporter process.- Returns:
- the default additional options
-
setNeDefaultAdditionalOptions
Set the default additional options for the node_exporter process. If null, no additional options are used.- Parameters:
defaultAdditionalOptions
- the additional options
-
getOcDefaultAdditionalOptions
Get the default additional options for the otel-contrib process.- Returns:
- the default additional options
-
setOcDefaultAdditionalOptions
Set the default additional options for the otel-contrib process. If null, no additional options are used.- Parameters:
defaultAdditionalOptions
- the additional options
-
getOtelConfigTemplate
Get the configuration template for the otel-contrib process.- Returns:
- the otel configuration template
-
setOtelConfigTemplate
Set a configuration template for the otel-contrib process. If null, the default template from the plugin resources is used.- Parameters:
otelConfigTemplate
- the OTEL configuration template
-