Class PodMetricsEndpoint
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.PodMetricsEndpoint
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<PodMetricsEndpointBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class PodMetricsEndpoint extends Object implements io.fabric8.kubernetes.api.builder.Editable<PodMetricsEndpointBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PodMetricsEndpoint()No args constructor for use in serializationPodMetricsEndpoint(SafeAuthorization authorization, BasicAuth basicAuth, 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, Integer portNumber, 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, SafeTLSConfig tlsConfig, Boolean trackTimestampsStaleness)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodMetricsEndpointBuilderedit()Map<String,Object>getAdditionalProperties()SafeAuthorizationgetAuthorization()PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.BasicAuthgetBasicAuth()PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.io.fabric8.kubernetes.api.model.SecretKeySelectorgetBearerTokenSecret()PodMetricsEndpoint 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()PodMetricsEndpoint 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()The `Pod` port name which exposes the endpoint.IntegergetPortNumber()The `Pod` port number which exposes the endpoint.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()PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.SafeTLSConfiggetTlsConfig()PodMetricsEndpoint 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)PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetBasicAuth(BasicAuth basicAuth)PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetBearerTokenSecret(io.fabric8.kubernetes.api.model.SecretKeySelector bearerTokenSecret)PodMetricsEndpoint 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)PodMetricsEndpoint 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)The `Pod` port name which exposes the endpoint.voidsetPortNumber(Integer portNumber)The `Pod` port number which exposes the endpoint.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)PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.voidsetTlsConfig(SafeTLSConfig tlsConfig)PodMetricsEndpoint 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.PodMetricsEndpointBuildertoBuilder()
-
-
-
Constructor Detail
-
PodMetricsEndpoint
public PodMetricsEndpoint()
No args constructor for use in serialization
-
PodMetricsEndpoint
public PodMetricsEndpoint(SafeAuthorization authorization, BasicAuth basicAuth, 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, Integer portNumber, 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, SafeTLSConfig tlsConfig, Boolean trackTimestampsStaleness)
-
-
Method Detail
-
getAuthorization
public SafeAuthorization getAuthorization()
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setAuthorization
public void setAuthorization(SafeAuthorization authorization)
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getBasicAuth
public BasicAuth getBasicAuth()
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setBasicAuth
public void setBasicAuth(BasicAuth basicAuth)
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getBearerTokenSecret
public io.fabric8.kubernetes.api.model.SecretKeySelector getBearerTokenSecret()
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setBearerTokenSecret
public void setBearerTokenSecret(io.fabric8.kubernetes.api.model.SecretKeySelector bearerTokenSecret)
PodMetricsEndpoint 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()
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setOauth2
public void setOauth2(OAuth2 oauth2)
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getParams
public Map<String,List<String>> getParams()
`params` define optional HTTP URL parameters.
-
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()
The `Pod` port name which exposes the endpoint.It takes precedence over the `portNumber` and `targetPort` fields.
-
setPort
public void setPort(String port)
The `Pod` port name which exposes the endpoint.It takes precedence over the `portNumber` and `targetPort` fields.
-
getPortNumber
public Integer getPortNumber()
The `Pod` port number which exposes the endpoint.
-
setPortNumber
public void setPortNumber(Integer portNumber)
The `Pod` port number which exposes the endpoint.
-
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()
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setTargetPort
public void setTargetPort(io.fabric8.kubernetes.api.model.IntOrString targetPort)
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
getTlsConfig
public SafeTLSConfig getTlsConfig()
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
-
setTlsConfig
public void setTlsConfig(SafeTLSConfig tlsConfig)
PodMetricsEndpoint 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 PodMetricsEndpointBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<PodMetricsEndpointBuilder>
-
toBuilder
public PodMetricsEndpointBuilder toBuilder()
-
-