Class Endpoint
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.Endpoint
-
- All Implemented Interfaces:
Editable<EndpointBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class Endpoint extends Object implements Editable<EndpointBuilder>, KubernetesResource
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Endpoint()No args constructor for use in serializationEndpoint(SafeAuthorization authorization, BasicAuth basicAuth, String bearerTokenFile, SecretKeySelector bearerTokenSecret, Boolean enableHttp2, Boolean filterRunning, Boolean followRedirects, Boolean honorLabels, Boolean honorTimestamps, String interval, List<RelabelConfig> metricRelabelings, String noProxy, OAuth2 oauth2, Map<String,List<String>> params, String path, String port, Map<String,List<SecretKeySelector>> proxyConnectHeader, Boolean proxyFromEnvironment, String proxyUrl, List<RelabelConfig> relabelings, String scheme, String scrapeTimeout, IntOrString targetPort, TLSConfig tlsConfig, Boolean trackTimestampsStaleness)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EndpointBuilderedit()Map<String,Object>getAdditionalProperties()SafeAuthorizationgetAuthorization()Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.BasicAuthgetBasicAuth()Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.StringgetBearerTokenFile()bearerTokenFile defines the file to read bearer token for scraping the target.SecretKeySelectorgetBearerTokenSecret()Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.BooleangetEnableHttp2()enableHttp2 can be used to disable HTTP2.BooleangetFilterRunning()filterRunning when true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery.BooleangetFollowRedirects()followRedirects defines whether the client should follow HTTP 3xx redirects.BooleangetHonorLabels()honorLabels defines when true the metric's labels when they collide with the target's labels.BooleangetHonorTimestamps()honorTimestamps defines whether Prometheus preserves the timestamps when exposed by the target.StringgetInterval()interval at which Prometheus scrapes the metrics from the target.List<RelabelConfig>getMetricRelabelings()metricRelabelings defines the relabeling rules to apply to the samples before ingestion.StringgetNoProxy()noProxy defines a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying.OAuth2getOauth2()Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.Map<String,List<String>>getParams()params define optional HTTP URL parameters.StringgetPath()path defines the HTTP path from which to scrape for metrics.StringgetPort()port defines the name of the Service port which this endpoint refers to.Map<String,List<SecretKeySelector>>getProxyConnectHeader()proxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.BooleangetProxyFromEnvironment()proxyFromEnvironment defines whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).StringgetProxyUrl()proxyUrl defines the HTTP proxy server to use.List<RelabelConfig>getRelabelings()relabelings defines the relabeling rules to apply the target's metadata labels.StringgetScheme()scheme defines the HTTP scheme to use when scraping the metrics.StringgetScrapeTimeout()scrapeTimeout defines the timeout after which Prometheus considers the scrape to be failed.IntOrStringgetTargetPort()Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.TLSConfiggetTlsConfig()Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.BooleangetTrackTimestampsStaleness()trackTimestampsStaleness defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAuthorization(SafeAuthorization authorization)Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetBasicAuth(BasicAuth basicAuth)Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetBearerTokenFile(String bearerTokenFile)bearerTokenFile defines the file to read bearer token for scraping the target.voidsetBearerTokenSecret(SecretKeySelector bearerTokenSecret)Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetEnableHttp2(Boolean enableHttp2)enableHttp2 can be used to disable HTTP2.voidsetFilterRunning(Boolean filterRunning)filterRunning when true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery.voidsetFollowRedirects(Boolean followRedirects)followRedirects defines whether the client should follow HTTP 3xx redirects.voidsetHonorLabels(Boolean honorLabels)honorLabels defines when true the metric's labels when they collide with the target's labels.voidsetHonorTimestamps(Boolean honorTimestamps)honorTimestamps defines whether Prometheus preserves the timestamps when exposed by the target.voidsetInterval(String interval)interval at which Prometheus scrapes the metrics from the target.voidsetMetricRelabelings(List<RelabelConfig> metricRelabelings)metricRelabelings defines the relabeling rules to apply to the samples before ingestion.voidsetNoProxy(String noProxy)noProxy defines a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying.voidsetOauth2(OAuth2 oauth2)Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetParams(Map<String,List<String>> params)params define optional HTTP URL parameters.voidsetPath(String path)path defines the HTTP path from which to scrape for metrics.voidsetPort(String port)port defines the name of the Service port which this endpoint refers to.voidsetProxyConnectHeader(Map<String,List<SecretKeySelector>> proxyConnectHeader)proxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.voidsetProxyFromEnvironment(Boolean proxyFromEnvironment)proxyFromEnvironment defines whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).voidsetProxyUrl(String proxyUrl)proxyUrl defines the HTTP proxy server to use.voidsetRelabelings(List<RelabelConfig> relabelings)relabelings defines the relabeling rules to apply the target's metadata labels.voidsetScheme(String scheme)scheme defines the HTTP scheme to use when scraping the metrics.voidsetScrapeTimeout(String scrapeTimeout)scrapeTimeout defines the timeout after which Prometheus considers the scrape to be failed.voidsetTargetPort(IntOrString targetPort)Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetTlsConfig(TLSConfig tlsConfig)Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetTrackTimestampsStaleness(Boolean trackTimestampsStaleness)trackTimestampsStaleness defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data.EndpointBuildertoBuilder()
-
-
-
Constructor Detail
-
Endpoint
public Endpoint()
No args constructor for use in serialization
-
Endpoint
public Endpoint(SafeAuthorization authorization, BasicAuth basicAuth, String bearerTokenFile, SecretKeySelector bearerTokenSecret, Boolean enableHttp2, Boolean filterRunning, Boolean followRedirects, Boolean honorLabels, Boolean honorTimestamps, String interval, List<RelabelConfig> metricRelabelings, String noProxy, OAuth2 oauth2, Map<String,List<String>> params, String path, String port, Map<String,List<SecretKeySelector>> proxyConnectHeader, Boolean proxyFromEnvironment, String proxyUrl, List<RelabelConfig> relabelings, String scheme, String scrapeTimeout, IntOrString targetPort, TLSConfig tlsConfig, Boolean trackTimestampsStaleness)
-
-
Method Detail
-
getAuthorization
public SafeAuthorization getAuthorization()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setAuthorization
public void setAuthorization(SafeAuthorization authorization)
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getBasicAuth
public BasicAuth getBasicAuth()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setBasicAuth
public void setBasicAuth(BasicAuth basicAuth)
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getBearerTokenFile
public String getBearerTokenFile()
bearerTokenFile defines the file to read bearer token for scraping the target.Deprecated: use `authorization` instead.
-
setBearerTokenFile
public void setBearerTokenFile(String bearerTokenFile)
bearerTokenFile defines the file to read bearer token for scraping the target.Deprecated: use `authorization` instead.
-
getBearerTokenSecret
public SecretKeySelector getBearerTokenSecret()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setBearerTokenSecret
public void setBearerTokenSecret(SecretKeySelector bearerTokenSecret)
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getEnableHttp2
public Boolean getEnableHttp2()
enableHttp2 can be used to disable HTTP2.
-
setEnableHttp2
public void setEnableHttp2(Boolean enableHttp2)
enableHttp2 can be used to disable HTTP2.
-
getFilterRunning
public Boolean getFilterRunning()
filterRunning when true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery.If unset, the filtering is enabled.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
-
setFilterRunning
public void setFilterRunning(Boolean filterRunning)
filterRunning when true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery.If unset, the filtering is enabled.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
-
getFollowRedirects
public Boolean getFollowRedirects()
followRedirects defines whether the client should follow HTTP 3xx redirects.
-
setFollowRedirects
public void setFollowRedirects(Boolean followRedirects)
followRedirects defines whether the client should follow HTTP 3xx redirects.
-
getHonorLabels
public Boolean getHonorLabels()
honorLabels defines when true the metric's labels when they collide with the target's labels.
-
setHonorLabels
public void setHonorLabels(Boolean honorLabels)
honorLabels defines when true the metric's labels when they collide with the target's labels.
-
getHonorTimestamps
public Boolean getHonorTimestamps()
honorTimestamps defines whether Prometheus preserves the timestamps when exposed by the target.
-
setHonorTimestamps
public void setHonorTimestamps(Boolean honorTimestamps)
honorTimestamps defines whether Prometheus preserves the timestamps when exposed by the target.
-
getInterval
public String getInterval()
interval at which Prometheus scrapes the metrics from the target.If empty, Prometheus uses the global scrape interval.
-
setInterval
public void setInterval(String interval)
interval at which Prometheus scrapes the metrics from the target.If empty, Prometheus uses the global scrape interval.
-
getMetricRelabelings
public List<RelabelConfig> getMetricRelabelings()
metricRelabelings defines the relabeling rules to apply to the samples before ingestion.
-
setMetricRelabelings
public void setMetricRelabelings(List<RelabelConfig> metricRelabelings)
metricRelabelings defines the relabeling rules to apply to the samples before ingestion.
-
getNoProxy
public String getNoProxy()
noProxy defines a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying. IP and domain names can contain port numbers.It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.
-
setNoProxy
public void setNoProxy(String noProxy)
noProxy defines a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying. IP and domain names can contain port numbers.It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.
-
getOauth2
public OAuth2 getOauth2()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setOauth2
public void setOauth2(OAuth2 oauth2)
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setParams
public void setParams(Map<String,List<String>> params)
params define optional HTTP URL parameters.
-
getPath
public String getPath()
path defines the HTTP path from which to scrape for metrics.If empty, Prometheus uses the default value (e.g. `/metrics`).
-
setPath
public void setPath(String path)
path defines the HTTP path from which to scrape for metrics.If empty, Prometheus uses the default value (e.g. `/metrics`).
-
getPort
public String getPort()
port defines the name of the Service port which this endpoint refers to.It takes precedence over `targetPort`.
-
setPort
public void setPort(String port)
port defines the name of the Service port which this endpoint refers to.It takes precedence over `targetPort`.
-
getProxyConnectHeader
public Map<String,List<SecretKeySelector>> getProxyConnectHeader()
proxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.
-
setProxyConnectHeader
public void setProxyConnectHeader(Map<String,List<SecretKeySelector>> proxyConnectHeader)
proxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.
-
getProxyFromEnvironment
public Boolean getProxyFromEnvironment()
proxyFromEnvironment defines whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.
-
setProxyFromEnvironment
public void setProxyFromEnvironment(Boolean proxyFromEnvironment)
proxyFromEnvironment defines whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.
-
getProxyUrl
public String getProxyUrl()
proxyUrl defines the HTTP proxy server to use.
-
setProxyUrl
public void setProxyUrl(String proxyUrl)
proxyUrl defines the HTTP proxy server to use.
-
getRelabelings
public List<RelabelConfig> getRelabelings()
relabelings defines the relabeling rules to apply the target's metadata labels.The Operator automatically adds relabelings for a few standard Kubernetes fields.
The original scrape job's name is available via the `__tmp_prometheus_job_name` label.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
-
setRelabelings
public void setRelabelings(List<RelabelConfig> relabelings)
relabelings defines the relabeling rules to apply the target's metadata labels.The Operator automatically adds relabelings for a few standard Kubernetes fields.
The original scrape job's name is available via the `__tmp_prometheus_job_name` label.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
-
getScheme
public String getScheme()
scheme defines the HTTP scheme to use when scraping the metrics.
-
setScheme
public void setScheme(String scheme)
scheme defines the HTTP scheme to use when scraping the metrics.
-
getScrapeTimeout
public String getScrapeTimeout()
scrapeTimeout defines the timeout after which Prometheus considers the scrape to be failed.If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.
-
setScrapeTimeout
public void setScrapeTimeout(String scrapeTimeout)
scrapeTimeout defines the timeout after which Prometheus considers the scrape to be failed.If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.
-
getTargetPort
public IntOrString getTargetPort()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setTargetPort
public void setTargetPort(IntOrString targetPort)
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getTlsConfig
public TLSConfig getTlsConfig()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setTlsConfig
public void setTlsConfig(TLSConfig tlsConfig)
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getTrackTimestampsStaleness
public Boolean getTrackTimestampsStaleness()
trackTimestampsStaleness defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data. Has no effect if `honorTimestamps` is false.It requires Prometheus >= v2.48.0.
-
setTrackTimestampsStaleness
public void setTrackTimestampsStaleness(Boolean trackTimestampsStaleness)
trackTimestampsStaleness defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data. Has no effect if `honorTimestamps` is false.It requires Prometheus >= v2.48.0.
-
edit
public EndpointBuilder edit()
- Specified by:
editin interfaceEditable<EndpointBuilder>
-
toBuilder
public EndpointBuilder toBuilder()
-
-