Class Endpoint
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.Endpoint
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<EndpointBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class Endpoint extends Object implements io.fabric8.kubernetes.api.builder.Editable<EndpointBuilder>, io.fabric8.kubernetes.api.model.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, io.fabric8.kubernetes.api.model.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<io.fabric8.kubernetes.api.model.SecretKeySelector>> proxyConnectHeader, Boolean proxyFromEnvironment, String proxyUrl, List<RelabelConfig> relabelings, String scheme, String scrapeTimeout, io.fabric8.kubernetes.api.model.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()File to read bearer token for scraping the target.io.fabric8.kubernetes.api.model.SecretKeySelectorgetBearerTokenSecret()Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.BooleangetEnableHttp2()`enableHttp2` can be used to disable HTTP2 when scraping the target.BooleangetFilterRunning()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 scrape requests should follow HTTP 3xx redirects.BooleangetHonorLabels()When true, `honorLabels` preserves the metric's labels when they collide with the target's labels.BooleangetHonorTimestamps()`honorTimestamps` controls 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` configures the relabeling rules to apply to the samples before ingestion.StringgetNoProxy()`noProxy` is 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()HTTP path from which to scrape for metrics.StringgetPort()Name of the Service port which this endpoint refers to.Map<String,List<io.fabric8.kubernetes.api.model.SecretKeySelector>>getProxyConnectHeader()ProxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.BooleangetProxyFromEnvironment()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` configures the relabeling rules to apply the target's metadata labels.StringgetScheme()HTTP scheme to use for scraping.StringgetScrapeTimeout()Timeout after which Prometheus considers the scrape to be failed.io.fabric8.kubernetes.api.model.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)File to read bearer token for scraping the target.voidsetBearerTokenSecret(io.fabric8.kubernetes.api.model.SecretKeySelector bearerTokenSecret)Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetEnableHttp2(Boolean enableHttp2)`enableHttp2` can be used to disable HTTP2 when scraping the target.voidsetFilterRunning(Boolean 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 scrape requests should follow HTTP 3xx redirects.voidsetHonorLabels(Boolean honorLabels)When true, `honorLabels` preserves the metric's labels when they collide with the target's labels.voidsetHonorTimestamps(Boolean honorTimestamps)`honorTimestamps` controls 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` configures the relabeling rules to apply to the samples before ingestion.voidsetNoProxy(String noProxy)`noProxy` is 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)HTTP path from which to scrape for metrics.voidsetPort(String port)Name of the Service port which this endpoint refers to.voidsetProxyConnectHeader(Map<String,List<io.fabric8.kubernetes.api.model.SecretKeySelector>> proxyConnectHeader)ProxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.voidsetProxyFromEnvironment(Boolean proxyFromEnvironment)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` configures the relabeling rules to apply the target's metadata labels.voidsetScheme(String scheme)HTTP scheme to use for scraping.voidsetScrapeTimeout(String scrapeTimeout)Timeout after which Prometheus considers the scrape to be failed.voidsetTargetPort(io.fabric8.kubernetes.api.model.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, io.fabric8.kubernetes.api.model.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<io.fabric8.kubernetes.api.model.SecretKeySelector>> proxyConnectHeader, Boolean proxyFromEnvironment, String proxyUrl, List<RelabelConfig> relabelings, String scheme, String scrapeTimeout, io.fabric8.kubernetes.api.model.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()
File to read bearer token for scraping the target.Deprecated: use `authorization` instead.
-
setBearerTokenFile
public void setBearerTokenFile(String bearerTokenFile)
File to read bearer token for scraping the target.Deprecated: use `authorization` instead.
-
getBearerTokenSecret
public io.fabric8.kubernetes.api.model.SecretKeySelector getBearerTokenSecret()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setBearerTokenSecret
public void setBearerTokenSecret(io.fabric8.kubernetes.api.model.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 when scraping the target.
-
setEnableHttp2
public void setEnableHttp2(Boolean enableHttp2)
`enableHttp2` can be used to disable HTTP2 when scraping the target.
-
getFilterRunning
public Boolean getFilterRunning()
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)
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 scrape requests should follow HTTP 3xx redirects.
-
setFollowRedirects
public void setFollowRedirects(Boolean followRedirects)
`followRedirects` defines whether the scrape requests should follow HTTP 3xx redirects.
-
getHonorLabels
public Boolean getHonorLabels()
When true, `honorLabels` preserves the metric's labels when they collide with the target's labels.
-
setHonorLabels
public void setHonorLabels(Boolean honorLabels)
When true, `honorLabels` preserves the metric's labels when they collide with the target's labels.
-
getHonorTimestamps
public Boolean getHonorTimestamps()
`honorTimestamps` controls whether Prometheus preserves the timestamps when exposed by the target.
-
setHonorTimestamps
public void setHonorTimestamps(Boolean honorTimestamps)
`honorTimestamps` controls 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` configures the relabeling rules to apply to the samples before ingestion.
-
setMetricRelabelings
public void setMetricRelabelings(List<RelabelConfig> metricRelabelings)
`metricRelabelings` configures the relabeling rules to apply to the samples before ingestion.
-
getNoProxy
public String getNoProxy()
`noProxy` is 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` is 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()
HTTP path from which to scrape for metrics.If empty, Prometheus uses the default value (e.g. `/metrics`).
-
setPath
public void setPath(String path)
HTTP path from which to scrape for metrics.If empty, Prometheus uses the default value (e.g. `/metrics`).
-
getPort
public String getPort()
Name of the Service port which this endpoint refers to.It takes precedence over `targetPort`.
-
setPort
public void setPort(String port)
Name of the Service port which this endpoint refers to.It takes precedence over `targetPort`.
-
getProxyConnectHeader
public Map<String,List<io.fabric8.kubernetes.api.model.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<io.fabric8.kubernetes.api.model.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()
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)
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` configures 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` configures 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()
HTTP scheme to use for scraping.`http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling.
If empty, Prometheus uses the default value `http`.
-
setScheme
public void setScheme(String scheme)
HTTP scheme to use for scraping.`http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling.
If empty, Prometheus uses the default value `http`.
-
getScrapeTimeout
public String getScrapeTimeout()
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)
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 io.fabric8.kubernetes.api.model.IntOrString getTargetPort()
Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setTargetPort
public void setTargetPort(io.fabric8.kubernetes.api.model.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 interfaceio.fabric8.kubernetes.api.builder.Editable<EndpointBuilder>
-
toBuilder
public EndpointBuilder toBuilder()
-
-