Class RemoteWriteSpec

  • All Implemented Interfaces:
    io.fabric8.kubernetes.api.builder.Editable<RemoteWriteSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource, Serializable

    @Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
    public class RemoteWriteSpec
    extends Object
    implements io.fabric8.kubernetes.api.builder.Editable<RemoteWriteSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
    RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.
    See Also:
    Serialized Form
    • 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()
        *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.*


        Deprecated: this will be removed in a future release.

      • setBearerToken

        public void setBearerToken​(String bearerToken)
        *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.*


        Deprecated: this will be removed in a future release.

      • getBearerTokenFile

        public String getBearerTokenFile()
        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)
        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()
        Whether to enable HTTP2.
      • setEnableHTTP2

        public void setEnableHTTP2​(Boolean enableHTTP2)
        Whether to enable HTTP2.
      • getFollowRedirects

        public Boolean getFollowRedirects()
        Configure whether HTTP requests follow HTTP 3xx redirects.


        It requires Prometheus >= v2.26.0 or Thanos >= v0.24.0.

      • setFollowRedirects

        public void setFollowRedirects​(Boolean followRedirects)
        Configure whether HTTP requests follow HTTP 3xx redirects.


        It requires Prometheus >= v2.26.0 or Thanos >= v0.24.0.

      • getHeaders

        public Map<String,​String> getHeaders()
        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)
        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()
        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)
        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()
        The 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)
        The 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` 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()
        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<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.
      • 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()
        Timeout for requests to the remote write endpoint.
      • setRemoteTimeout

        public void setRemoteTimeout​(String remoteTimeout)
        Timeout for requests to the remote write endpoint.
      • getRoundRobinDNS

        public Boolean getRoundRobinDNS()
        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)
        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()
        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)
        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()
        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)
        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()
        The URL of the endpoint to send samples to.
      • setUrl

        public void setUrl​(String url)
        The URL of the endpoint to send samples to.
      • getWriteRelabelConfigs

        public List<RelabelConfig> getWriteRelabelConfigs()
        The list of remote write relabel configurations.
      • setWriteRelabelConfigs

        public void setWriteRelabelConfigs​(List<RelabelConfig> writeRelabelConfigs)
        The list of remote write relabel configurations.
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)