Class RemoteWriteSpec

    • 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.
      • getAdditionalProperties

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

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

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