Probe

Scope: Namespaced
Version: v1

Probe defines monitoring for a set of static targets or ingresses.

  • apiVersion
    string

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

  • kind
    string

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

  • metadata
    object
  • spec
    object

    Required value

    Specification of desired Ingress selection for target discovery by Prometheus.

    • spec.authorization
      object

      Authorization section for this endpoint

      • spec.authorization.credentials
        object

        Selects a key of a Secret in the namespace that contains the credentials for authentication.

        • spec.authorization.credentials.key
          string

          Required value

          The key of the secret to select from. Must be a valid secret key.

        • spec.authorization.credentials.name
          string

          Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

        • spec.authorization.credentials.optional
          boolean

          Specify whether the Secret or its key must be defined

      • spec.authorization.type
        string

        Defines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”

    • spec.basicAuth
      object

      BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint

      • spec.basicAuth.password
        object

        The secret in the service monitor namespace that contains the password for authentication.

        • spec.basicAuth.password.key
          string

          Required value

          The key of the secret to select from. Must be a valid secret key.

        • spec.basicAuth.password.name
          string

          Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

        • spec.basicAuth.password.optional
          boolean

          Specify whether the Secret or its key must be defined

      • spec.basicAuth.username
        object

        The secret in the service monitor namespace that contains the username for authentication.

        • spec.basicAuth.username.key
          string

          Required value

          The key of the secret to select from. Must be a valid secret key.

        • spec.basicAuth.username.name
          string

          Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

        • spec.basicAuth.username.optional
          boolean

          Specify whether the Secret or its key must be defined

    • spec.bearerTokenSecret
      object

      Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the probe and accessible by the Prometheus Operator.

      • spec.bearerTokenSecret.key
        string

        Required value

        The key of the secret to select from. Must be a valid secret key.

      • spec.bearerTokenSecret.name
        string

        Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

      • spec.bearerTokenSecret.optional
        boolean

        Specify whether the Secret or its key must be defined

    • spec.interval
      string

      Interval at which targets are probed using the configured prober. If not specified Prometheus’ global scrape interval is used.

      Pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$

    • spec.jobName
      string

      The job name assigned to scraped metrics by default.

    • spec.keepDroppedTargets
      integer

      Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit. It requires Prometheus >= v2.47.0.

    • spec.labelLimit
      integer

      Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.

    • spec.labelNameLengthLimit
      integer

      Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.

    • spec.labelValueLengthLimit
      integer

      Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.

    • spec.metricRelabelings
      array of objects

      MetricRelabelConfigs to apply to samples before ingestion.

      RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

      • spec.metricRelabelings.action
        string

        Action to perform based on the regex matching. Uppercase and Lowercase actions require Prometheus >= v2.36.0. DropEqual and KeepEqual actions require Prometheus >= v2.41.0. Default: “Replace”

        Default: "replace"

        Allowed values: replace, Replace, keep, Keep, drop, Drop, hashmod, HashMod, labelmap, LabelMap, labeldrop, LabelDrop, labelkeep, LabelKeep, lowercase, Lowercase, uppercase, Uppercase, keepequal, KeepEqual, dropequal, DropEqual

      • spec.metricRelabelings.modulus
        integer

        Modulus to take of the hash of the source label values. Only applicable when the action is HashMod.

      • spec.metricRelabelings.regex
        string

        Regular expression against which the extracted value is matched.

      • spec.metricRelabelings.replacement
        string

        Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.

      • spec.metricRelabelings.separator
        string

        Separator is the string between concatenated SourceLabels.

      • spec.metricRelabelings.sourceLabels
        array of strings

        The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.

        • Element of the array
          string

          LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores.

          Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$

      • spec.metricRelabelings.targetLabel
        string

        Label to which the resulting string is written in a replacement. It is mandatory for Replace, HashMod, Lowercase, Uppercase, KeepEqual and DropEqual actions. Regex capture groups are available.

    • spec.module
      string

      The module to use for probing specifying how to probe the target. Example module configuring in the blackbox exporter: https://github.com/prometheus/blackbox_exporter/blob/master/example.yml

    • spec.oauth2
      object

      OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.

      • spec.oauth2.clientId
        object

        Required value

        The secret or configmap containing the OAuth2 client id

        • spec.oauth2.clientId.configMap
          object

          ConfigMap containing data to use for the targets.

          • spec.oauth2.clientId.configMap.key
            string

            Required value

            The key to select.

          • spec.oauth2.clientId.configMap.name
            string

            Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

          • spec.oauth2.clientId.configMap.optional
            boolean

            Specify whether the ConfigMap or its key must be defined

        • spec.oauth2.clientId.secret
          object

          Secret containing data to use for the targets.

          • spec.oauth2.clientId.secret.key
            string

            Required value

            The key of the secret to select from. Must be a valid secret key.

          • spec.oauth2.clientId.secret.name
            string

            Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

          • spec.oauth2.clientId.secret.optional
            boolean

            Specify whether the Secret or its key must be defined

      • spec.oauth2.clientSecret
        object

        Required value

        The secret containing the OAuth2 client secret

        • spec.oauth2.clientSecret.key
          string

          Required value

          The key of the secret to select from. Must be a valid secret key.

        • spec.oauth2.clientSecret.name
          string

          Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

        • spec.oauth2.clientSecret.optional
          boolean

          Specify whether the Secret or its key must be defined

      • spec.oauth2.endpointParams
        object

        Parameters to append to the token URL

      • spec.oauth2.scopes
        array of strings

        OAuth2 scopes used for the token request

      • spec.oauth2.tokenUrl
        string

        Required value

        The URL to fetch the token from

    • spec.prober
      object

      Specification for the prober to use for probing targets. The prober.URL parameter is required. Targets cannot be probed if left empty.

      • spec.prober.path
        string

        Path to collect metrics from. Defaults to /probe.

        Default: "/probe"

      • spec.prober.proxyUrl
        string

        Optional ProxyURL.

      • spec.prober.scheme
        string

        HTTP scheme to use for scraping. http and https are the expected values unless you rewrite the __scheme__ label via relabeling. If empty, Prometheus uses the default value http.

        Allowed values: http, https

      • spec.prober.url
        string

        Required value

        Mandatory URL of the prober.

    • spec.sampleLimit
      integer

      SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.

    • spec.scrapeTimeout
      string

      Timeout for scraping metrics from the Prometheus exporter. If not specified, the Prometheus global scrape timeout is used.

      Pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$

    • spec.targetLimit
      integer

      TargetLimit defines a limit on the number of scraped targets that will be accepted.

    • spec.targets
      object

      Targets defines a set of static or dynamically discovered targets to probe.

      • spec.targets.ingress
        object

        ingress defines the Ingress objects to probe and the relabeling configuration. If staticConfig is also defined, staticConfig takes precedence.

        • spec.targets.ingress.namespaceSelector
          object

          From which namespaces to select Ingress objects.

          • spec.targets.ingress.namespaceSelector.any
            boolean

            Boolean describing whether all namespaces are selected in contrast to a list restricting them.

          • spec.targets.ingress.namespaceSelector.matchNames
            array of strings

            List of namespace names to select from.

        • spec.targets.ingress.relabelingConfigs
          array of objects

          RelabelConfigs to apply to the label set of the target before it gets scraped. The original ingress address is available via the __tmp_prometheus_ingress_address label. It can be used to customize the probed URL. 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

          RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

          • spec.targets.ingress.relabelingConfigs.action
            string

            Action to perform based on the regex matching. Uppercase and Lowercase actions require Prometheus >= v2.36.0. DropEqual and KeepEqual actions require Prometheus >= v2.41.0. Default: “Replace”

            Default: "replace"

            Allowed values: replace, Replace, keep, Keep, drop, Drop, hashmod, HashMod, labelmap, LabelMap, labeldrop, LabelDrop, labelkeep, LabelKeep, lowercase, Lowercase, uppercase, Uppercase, keepequal, KeepEqual, dropequal, DropEqual

          • spec.targets.ingress.relabelingConfigs.modulus
            integer

            Modulus to take of the hash of the source label values. Only applicable when the action is HashMod.

          • spec.targets.ingress.relabelingConfigs.regex
            string

            Regular expression against which the extracted value is matched.

          • spec.targets.ingress.relabelingConfigs.replacement
            string

            Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.

          • spec.targets.ingress.relabelingConfigs.separator
            string

            Separator is the string between concatenated SourceLabels.

          • spec.targets.ingress.relabelingConfigs.sourceLabels
            array of strings

            The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.

            • Element of the array
              string

              LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores.

              Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$

          • spec.targets.ingress.relabelingConfigs.targetLabel
            string

            Label to which the resulting string is written in a replacement. It is mandatory for Replace, HashMod, Lowercase, Uppercase, KeepEqual and DropEqual actions. Regex capture groups are available.

        • spec.targets.ingress.selector
          object

          Selector to select the Ingress objects.

          • spec.targets.ingress.selector.matchExpressions
            array of objects

            matchExpressions is a list of label selector requirements. The requirements are ANDed.

            A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

            • spec.targets.ingress.selector.matchExpressions.key
              string

              Required value

              key is the label key that the selector applies to.

            • spec.targets.ingress.selector.matchExpressions.operator
              string

              Required value

              operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

            • spec.targets.ingress.selector.matchExpressions.values
              array of strings

              values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

          • spec.targets.ingress.selector.matchLabels
            object

            matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

      • spec.targets.staticConfig
        object

        staticConfig defines the static list of targets to probe and the relabeling configuration. If ingress is also defined, staticConfig takes precedence. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config.

        • spec.targets.staticConfig.labels
          object

          Labels assigned to all metrics scraped from the targets.

        • spec.targets.staticConfig.relabelingConfigs
          array of objects

          RelabelConfigs to apply to the label set of the targets before it gets scraped. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

          RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

          • spec.targets.staticConfig.relabelingConfigs.action
            string

            Action to perform based on the regex matching. Uppercase and Lowercase actions require Prometheus >= v2.36.0. DropEqual and KeepEqual actions require Prometheus >= v2.41.0. Default: “Replace”

            Default: "replace"

            Allowed values: replace, Replace, keep, Keep, drop, Drop, hashmod, HashMod, labelmap, LabelMap, labeldrop, LabelDrop, labelkeep, LabelKeep, lowercase, Lowercase, uppercase, Uppercase, keepequal, KeepEqual, dropequal, DropEqual

          • spec.targets.staticConfig.relabelingConfigs.modulus
            integer

            Modulus to take of the hash of the source label values. Only applicable when the action is HashMod.

          • spec.targets.staticConfig.relabelingConfigs.regex
            string

            Regular expression against which the extracted value is matched.

          • spec.targets.staticConfig.relabelingConfigs.replacement
            string

            Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.

          • spec.targets.staticConfig.relabelingConfigs.separator
            string

            Separator is the string between concatenated SourceLabels.

          • spec.targets.staticConfig.relabelingConfigs.sourceLabels
            array of strings

            The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.

            • Element of the array
              string

              LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores.

              Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$

          • spec.targets.staticConfig.relabelingConfigs.targetLabel
            string

            Label to which the resulting string is written in a replacement. It is mandatory for Replace, HashMod, Lowercase, Uppercase, KeepEqual and DropEqual actions. Regex capture groups are available.

        • spec.targets.staticConfig.static
          array of strings

          The list of hosts to probe.

    • spec.tlsConfig
      object

      TLS configuration to use when scraping the endpoint.

      • spec.tlsConfig.ca
        object

        Certificate authority used when verifying server certificates.

        • spec.tlsConfig.ca.configMap
          object

          ConfigMap containing data to use for the targets.

          • spec.tlsConfig.ca.configMap.key
            string

            Required value

            The key to select.

          • spec.tlsConfig.ca.configMap.name
            string

            Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

          • spec.tlsConfig.ca.configMap.optional
            boolean

            Specify whether the ConfigMap or its key must be defined

        • spec.tlsConfig.ca.secret
          object

          Secret containing data to use for the targets.

          • spec.tlsConfig.ca.secret.key
            string

            Required value

            The key of the secret to select from. Must be a valid secret key.

          • spec.tlsConfig.ca.secret.name
            string

            Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

          • spec.tlsConfig.ca.secret.optional
            boolean

            Specify whether the Secret or its key must be defined

      • spec.tlsConfig.cert
        object

        Client certificate to present when doing client-authentication.

        • spec.tlsConfig.cert.configMap
          object

          ConfigMap containing data to use for the targets.

          • spec.tlsConfig.cert.configMap.key
            string

            Required value

            The key to select.

          • spec.tlsConfig.cert.configMap.name
            string

            Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

          • spec.tlsConfig.cert.configMap.optional
            boolean

            Specify whether the ConfigMap or its key must be defined

        • spec.tlsConfig.cert.secret
          object

          Secret containing data to use for the targets.

          • spec.tlsConfig.cert.secret.key
            string

            Required value

            The key of the secret to select from. Must be a valid secret key.

          • spec.tlsConfig.cert.secret.name
            string

            Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

          • spec.tlsConfig.cert.secret.optional
            boolean

            Specify whether the Secret or its key must be defined

      • spec.tlsConfig.insecureSkipVerify
        boolean

        Disable target certificate validation.

      • spec.tlsConfig.keySecret
        object

        Secret containing the client key file for the targets.

        • spec.tlsConfig.keySecret.key
          string

          Required value

          The key of the secret to select from. Must be a valid secret key.

        • spec.tlsConfig.keySecret.name
          string

          Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

        • spec.tlsConfig.keySecret.optional
          boolean

          Specify whether the Secret or its key must be defined

      • spec.tlsConfig.serverName
        string

        Used to verify the hostname for the targets.