Class ScrapeClass

    • Method Detail

      • setAttachMetadata

        public void setAttachMetadata​(AttachMetadata attachMetadata)
      • setAuthorization

        public void setAuthorization​(Authorization authorization)
      • getDefault

        public Boolean getDefault()
        default defines that the scrape applies to all scrape objects that don't configure an explicit scrape class name.


        Only one scrape class can be set as the default.

      • setDefault

        public void setDefault​(Boolean _default)
        default defines that the scrape applies to all scrape objects that don't configure an explicit scrape class name.


        Only one scrape class can be set as the default.

      • getFallbackScrapeProtocol

        public String getFallbackScrapeProtocol()
        fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type. It will only apply if the scrape resource doesn't specify any FallbackScrapeProtocol


        It requires Prometheus >= v3.0.0.

      • setFallbackScrapeProtocol

        public void setFallbackScrapeProtocol​(String fallbackScrapeProtocol)
        fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type. It will only apply if the scrape resource doesn't specify any FallbackScrapeProtocol


        It requires Prometheus >= v3.0.0.

      • getMetricRelabelings

        public List<RelabelConfig> getMetricRelabelings()
        metricRelabelings defines the relabeling rules to apply to all samples before ingestion.


        The Operator adds the scrape class metric relabelings defined here. Then the Operator adds the target-specific metric relabelings defined in ServiceMonitors, PodMonitors, Probes and ScrapeConfigs. Then the Operator adds namespace enforcement relabeling rule, specified in '.spec.enforcedNamespaceLabel'.


        More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs

      • setMetricRelabelings

        public void setMetricRelabelings​(List<RelabelConfig> metricRelabelings)
        metricRelabelings defines the relabeling rules to apply to all samples before ingestion.


        The Operator adds the scrape class metric relabelings defined here. Then the Operator adds the target-specific metric relabelings defined in ServiceMonitors, PodMonitors, Probes and ScrapeConfigs. Then the Operator adds namespace enforcement relabeling rule, specified in '.spec.enforcedNamespaceLabel'.


        More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs

      • getName

        public String getName()
        name of the scrape class.
      • setName

        public void setName​(String name)
        name of the scrape class.
      • getRelabelings

        public List<RelabelConfig> getRelabelings()
        relabelings defines the relabeling rules to apply to all scrape targets.


        The Operator automatically adds relabelings for a few standard Kubernetes fields like `__meta_kubernetes_namespace` and `__meta_kubernetes_service_name`. Then the Operator adds the scrape class relabelings defined here. Then the Operator adds the target-specific relabelings defined in the scrape object.


        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 to all scrape targets.


        The Operator automatically adds relabelings for a few standard Kubernetes fields like `__meta_kubernetes_namespace` and `__meta_kubernetes_service_name`. Then the Operator adds the scrape class relabelings defined here. Then the Operator adds the target-specific relabelings defined in the scrape object.


        More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

      • getTlsConfig

        public TLSConfig getTlsConfig()
      • setTlsConfig

        public void setTlsConfig​(TLSConfig tlsConfig)
      • getAdditionalProperties

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

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

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