Class RemoteWriteSpec
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.RemoteWriteSpec
-
- All Implemented Interfaces:
Editable<RemoteWriteSpecBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class RemoteWriteSpec extends Object implements Editable<RemoteWriteSpecBuilder>, KubernetesResource
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RemoteWriteSpec()No args constructor for use in serializationRemoteWriteSpec(Authorization authorization, AzureAD azureAd, BasicAuth basicAuth, String bearerToken, String bearerTokenFile, Boolean enableHTTP2, Boolean followRedirects, Map<String,String> headers, String messageVersion, MetadataConfig metadataConfig, String name, String noProxy, OAuth2 oauth2, Map<String,List<SecretKeySelector>> proxyConnectHeader, Boolean proxyFromEnvironment, String proxyUrl, QueueConfig queueConfig, String remoteTimeout, Boolean roundRobinDNS, Boolean sendExemplars, Boolean sendNativeHistograms, Sigv4 sigv4, TLSConfig tlsConfig, String url, List<RelabelConfig> writeRelabelConfigs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RemoteWriteSpecBuilderedit()Map<String,Object>getAdditionalProperties()AuthorizationgetAuthorization()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.AzureADgetAzureAd()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.BasicAuthgetBasicAuth()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.StringgetBearerToken()bearerToken is deprecated: this will be removed in a future release.StringgetBearerTokenFile()bearerTokenFile defines the file from which to read bearer token for the URL.BooleangetEnableHTTP2()enableHTTP2 defines whether to enable HTTP2.BooleangetFollowRedirects()followRedirects defines whether HTTP requests follow HTTP 3xx redirects.Map<String,String>getHeaders()headers defines the custom HTTP headers to be sent along with each remote write request.StringgetMessageVersion()messageVersion defines the Remote Write message's version to use when writing to the endpoint.MetadataConfiggetMetadataConfig()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.StringgetName()name of the remote write queue, it must be unique if specified.StringgetNoProxy()noProxy defines a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying.OAuth2getOauth2()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.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.QueueConfiggetQueueConfig()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.StringgetRemoteTimeout()remoteTimeout defines the timeout for requests to the remote write endpoint.BooleangetRoundRobinDNS()roundRobinDNS controls the DNS resolution behavior for remote-write connections.BooleangetSendExemplars()sendExemplars enables sending of exemplars over remote write.BooleangetSendNativeHistograms()sendNativeHistograms enables sending of native histograms, also known as sparse histograms over remote write.Sigv4getSigv4()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.TLSConfiggetTlsConfig()RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.StringgetUrl()url defines the URL of the endpoint to send samples to.List<RelabelConfig>getWriteRelabelConfigs()writeRelabelConfigs defines the list of remote write relabel configurations.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAuthorization(Authorization authorization)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.voidsetAzureAd(AzureAD azureAd)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.voidsetBasicAuth(BasicAuth basicAuth)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.voidsetBearerToken(String bearerToken)bearerToken is deprecated: this will be removed in a future release.voidsetBearerTokenFile(String bearerTokenFile)bearerTokenFile defines the file from which to read bearer token for the URL.voidsetEnableHTTP2(Boolean enableHTTP2)enableHTTP2 defines whether to enable HTTP2.voidsetFollowRedirects(Boolean followRedirects)followRedirects defines whether HTTP requests follow HTTP 3xx redirects.voidsetHeaders(Map<String,String> headers)headers defines the custom HTTP headers to be sent along with each remote write request.voidsetMessageVersion(String messageVersion)messageVersion defines the Remote Write message's version to use when writing to the endpoint.voidsetMetadataConfig(MetadataConfig metadataConfig)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.voidsetName(String name)name of the remote write queue, it must be unique if specified.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)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.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.voidsetQueueConfig(QueueConfig queueConfig)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.voidsetRemoteTimeout(String remoteTimeout)remoteTimeout defines the timeout for requests to the remote write endpoint.voidsetRoundRobinDNS(Boolean roundRobinDNS)roundRobinDNS controls the DNS resolution behavior for remote-write connections.voidsetSendExemplars(Boolean sendExemplars)sendExemplars enables sending of exemplars over remote write.voidsetSendNativeHistograms(Boolean sendNativeHistograms)sendNativeHistograms enables sending of native histograms, also known as sparse histograms over remote write.voidsetSigv4(Sigv4 sigv4)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.voidsetTlsConfig(TLSConfig tlsConfig)RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.voidsetUrl(String url)url defines the URL of the endpoint to send samples to.voidsetWriteRelabelConfigs(List<RelabelConfig> writeRelabelConfigs)writeRelabelConfigs defines the list of remote write relabel configurations.RemoteWriteSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
RemoteWriteSpec
public RemoteWriteSpec()
No args constructor for use in serialization
-
RemoteWriteSpec
public RemoteWriteSpec(Authorization authorization, AzureAD azureAd, BasicAuth basicAuth, String bearerToken, String bearerTokenFile, Boolean enableHTTP2, Boolean followRedirects, Map<String,String> headers, String messageVersion, MetadataConfig metadataConfig, String name, String noProxy, OAuth2 oauth2, Map<String,List<SecretKeySelector>> proxyConnectHeader, Boolean proxyFromEnvironment, String proxyUrl, QueueConfig queueConfig, String remoteTimeout, Boolean roundRobinDNS, Boolean sendExemplars, Boolean sendNativeHistograms, Sigv4 sigv4, TLSConfig tlsConfig, String url, List<RelabelConfig> writeRelabelConfigs)
-
-
Method Detail
-
getAuthorization
public Authorization getAuthorization()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setAuthorization
public void setAuthorization(Authorization authorization)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
getAzureAd
public AzureAD getAzureAd()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setAzureAd
public void setAzureAd(AzureAD azureAd)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
getBasicAuth
public BasicAuth getBasicAuth()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setBasicAuth
public void setBasicAuth(BasicAuth basicAuth)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
getBearerToken
public String getBearerToken()
bearerToken is deprecated: this will be removed in a future release. *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.*
-
setBearerToken
public void setBearerToken(String bearerToken)
bearerToken is deprecated: this will be removed in a future release. *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.*
-
getBearerTokenFile
public String getBearerTokenFile()
bearerTokenFile defines the file from which to read bearer token for the URL.Deprecated: this will be removed in a future release. Prefer using `authorization`.
-
setBearerTokenFile
public void setBearerTokenFile(String bearerTokenFile)
bearerTokenFile defines the file from which to read bearer token for the URL.Deprecated: this will be removed in a future release. Prefer using `authorization`.
-
getEnableHTTP2
public Boolean getEnableHTTP2()
enableHTTP2 defines whether to enable HTTP2.
-
setEnableHTTP2
public void setEnableHTTP2(Boolean enableHTTP2)
enableHTTP2 defines whether to enable HTTP2.
-
getFollowRedirects
public Boolean getFollowRedirects()
followRedirects defines whether HTTP requests follow HTTP 3xx redirects.It requires Prometheus >= v2.26.0 or Thanos >= v0.24.0.
-
setFollowRedirects
public void setFollowRedirects(Boolean followRedirects)
followRedirects defines whether HTTP requests follow HTTP 3xx redirects.It requires Prometheus >= v2.26.0 or Thanos >= v0.24.0.
-
getHeaders
public Map<String,String> getHeaders()
headers defines the custom HTTP headers to be sent along with each remote write request. Be aware that headers that are set by Prometheus itself can't be overwritten.It requires Prometheus >= v2.25.0 or Thanos >= v0.24.0.
-
setHeaders
public void setHeaders(Map<String,String> headers)
headers defines the custom HTTP headers to be sent along with each remote write request. Be aware that headers that are set by Prometheus itself can't be overwritten.It requires Prometheus >= v2.25.0 or Thanos >= v0.24.0.
-
getMessageVersion
public String getMessageVersion()
messageVersion defines the Remote Write message's version to use when writing to the endpoint.`Version1.0` corresponds to the `prometheus.WriteRequest` protobuf message introduced in Remote Write 1.0. `Version2.0` corresponds to the `io.prometheus.write.v2.Request` protobuf message introduced in Remote Write 2.0.
When `Version2.0` is selected, Prometheus will automatically be configured to append the metadata of scraped metrics to the WAL.
Before setting this field, consult with your remote storage provider what message version it supports.
It requires Prometheus >= v2.54.0 or Thanos >= v0.37.0.
-
setMessageVersion
public void setMessageVersion(String messageVersion)
messageVersion defines the Remote Write message's version to use when writing to the endpoint.`Version1.0` corresponds to the `prometheus.WriteRequest` protobuf message introduced in Remote Write 1.0. `Version2.0` corresponds to the `io.prometheus.write.v2.Request` protobuf message introduced in Remote Write 2.0.
When `Version2.0` is selected, Prometheus will automatically be configured to append the metadata of scraped metrics to the WAL.
Before setting this field, consult with your remote storage provider what message version it supports.
It requires Prometheus >= v2.54.0 or Thanos >= v0.37.0.
-
getMetadataConfig
public MetadataConfig getMetadataConfig()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setMetadataConfig
public void setMetadataConfig(MetadataConfig metadataConfig)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
getName
public String getName()
name of the remote write queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate queues.It requires Prometheus >= v2.15.0 or Thanos >= 0.24.0.
-
setName
public void setName(String name)
name of the remote write queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate queues.It requires Prometheus >= v2.15.0 or Thanos >= 0.24.0.
-
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()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setOauth2
public void setOauth2(OAuth2 oauth2)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
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.
-
getQueueConfig
public QueueConfig getQueueConfig()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setQueueConfig
public void setQueueConfig(QueueConfig queueConfig)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
getRemoteTimeout
public String getRemoteTimeout()
remoteTimeout defines the timeout for requests to the remote write endpoint.
-
setRemoteTimeout
public void setRemoteTimeout(String remoteTimeout)
remoteTimeout defines the timeout for requests to the remote write endpoint.
-
getRoundRobinDNS
public Boolean getRoundRobinDNS()
roundRobinDNS controls the DNS resolution behavior for remote-write connections. When enabled:- The remote-write mechanism will resolve the hostname via DNS.
- It will randomly select one of the resolved IP addresses and connect to it.
When disabled (default behavior):
- The Go standard library will handle hostname resolution.
- It will attempt connections to each resolved IP address sequentially.
Note: The connection timeout applies to the entire resolution and connection process.
If disabled, the timeout is distributed across all connection attempts.
It requires Prometheus >= v3.1.0 or Thanos >= v0.38.0.
-
setRoundRobinDNS
public void setRoundRobinDNS(Boolean roundRobinDNS)
roundRobinDNS controls the DNS resolution behavior for remote-write connections. When enabled:- The remote-write mechanism will resolve the hostname via DNS.
- It will randomly select one of the resolved IP addresses and connect to it.
When disabled (default behavior):
- The Go standard library will handle hostname resolution.
- It will attempt connections to each resolved IP address sequentially.
Note: The connection timeout applies to the entire resolution and connection process.
If disabled, the timeout is distributed across all connection attempts.
It requires Prometheus >= v3.1.0 or Thanos >= v0.38.0.
-
getSendExemplars
public Boolean getSendExemplars()
sendExemplars enables sending of exemplars over remote write. Note that exemplar-storage itself must be enabled using the `spec.enableFeatures` option for exemplars to be scraped in the first place.It requires Prometheus >= v2.27.0 or Thanos >= v0.24.0.
-
setSendExemplars
public void setSendExemplars(Boolean sendExemplars)
sendExemplars enables sending of exemplars over remote write. Note that exemplar-storage itself must be enabled using the `spec.enableFeatures` option for exemplars to be scraped in the first place.It requires Prometheus >= v2.27.0 or Thanos >= v0.24.0.
-
getSendNativeHistograms
public Boolean getSendNativeHistograms()
sendNativeHistograms enables sending of native histograms, also known as sparse histograms over remote write.It requires Prometheus >= v2.40.0 or Thanos >= v0.30.0.
-
setSendNativeHistograms
public void setSendNativeHistograms(Boolean sendNativeHistograms)
sendNativeHistograms enables sending of native histograms, also known as sparse histograms over remote write.It requires Prometheus >= v2.40.0 or Thanos >= v0.30.0.
-
getSigv4
public Sigv4 getSigv4()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setSigv4
public void setSigv4(Sigv4 sigv4)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
getTlsConfig
public TLSConfig getTlsConfig()
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
setTlsConfig
public void setTlsConfig(TLSConfig tlsConfig)
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
-
getUrl
public String getUrl()
url defines the URL of the endpoint to send samples to.It must use the HTTP or HTTPS scheme.
-
setUrl
public void setUrl(String url)
url defines the URL of the endpoint to send samples to.It must use the HTTP or HTTPS scheme.
-
getWriteRelabelConfigs
public List<RelabelConfig> getWriteRelabelConfigs()
writeRelabelConfigs defines the list of remote write relabel configurations.
-
setWriteRelabelConfigs
public void setWriteRelabelConfigs(List<RelabelConfig> writeRelabelConfigs)
writeRelabelConfigs defines the list of remote write relabel configurations.
-
edit
public RemoteWriteSpecBuilder edit()
- Specified by:
editin interfaceEditable<RemoteWriteSpecBuilder>
-
toBuilder
public RemoteWriteSpecBuilder toBuilder()
-
-