Class Endpoint

    • 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()
        bearerTokenFile defines the file to read bearer token for scraping the target.


        Deprecated: use `authorization` instead.

      • setBearerTokenFile

        public void setBearerTokenFile​(String bearerTokenFile)
        bearerTokenFile defines the file to read bearer token for scraping the target.


        Deprecated: use `authorization` instead.

      • getBearerTokenSecret

        public SecretKeySelector getBearerTokenSecret()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setBearerTokenSecret

        public void setBearerTokenSecret​(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.
      • setEnableHttp2

        public void setEnableHttp2​(Boolean enableHttp2)
        enableHttp2 can be used to disable HTTP2.
      • getFilterRunning

        public Boolean getFilterRunning()
        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

      • setFilterRunning

        public void setFilterRunning​(Boolean filterRunning)
        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 client should follow HTTP 3xx redirects.
      • setFollowRedirects

        public void setFollowRedirects​(Boolean followRedirects)
        followRedirects defines whether the client should follow HTTP 3xx redirects.
      • getHonorLabels

        public Boolean getHonorLabels()
        honorLabels defines when true the metric's labels when they collide with the target's labels.
      • setHonorLabels

        public void setHonorLabels​(Boolean honorLabels)
        honorLabels defines when true the metric's labels when they collide with the target's labels.
      • getHonorTimestamps

        public Boolean getHonorTimestamps()
        honorTimestamps defines whether Prometheus preserves the timestamps when exposed by the target.
      • setHonorTimestamps

        public void setHonorTimestamps​(Boolean honorTimestamps)
        honorTimestamps defines 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 defines the relabeling rules to apply to the samples before ingestion.
      • setMetricRelabelings

        public void setMetricRelabelings​(List<RelabelConfig> metricRelabelings)
        metricRelabelings defines the relabeling rules to apply to the samples before ingestion.
      • 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()
        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.
      • 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()
        path defines the HTTP path from which to scrape for metrics.


        If empty, Prometheus uses the default value (e.g. `/metrics`).

      • setPath

        public void setPath​(String path)
        path defines the HTTP path from which to scrape for metrics.


        If empty, Prometheus uses the default value (e.g. `/metrics`).

      • getPort

        public String getPort()
        port defines the name of the Service port which this endpoint refers to.


        It takes precedence over `targetPort`.

      • setPort

        public void setPort​(String port)
        port defines the name of the Service port which this endpoint refers to.


        It takes precedence over `targetPort`.

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

        public List<RelabelConfig> getRelabelings()
        relabelings defines 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 defines 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()
        scheme defines the HTTP scheme to use when scraping the metrics.
      • setScheme

        public void setScheme​(String scheme)
        scheme defines the HTTP scheme to use when scraping the metrics.
      • getScrapeTimeout

        public String getScrapeTimeout()
        scrapeTimeout defines the 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)
        scrapeTimeout defines the 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 IntOrString getTargetPort()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setTargetPort

        public void setTargetPort​(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.

      • getAdditionalProperties

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

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

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