The module lifecycle stage: General Availability
The module has requirements for installation
The Deckhouse Kubernetes Platform installs CRDs but does not remove them when a module is disabled. If you no longer need the created CRDs, delete them.
PodMonitor
Scope: Namespaced
Version: v1
-
stringapiVersionAPIVersion 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
-
stringkindKind 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
-
objectmetadata
-
objectspecSpecification of desired Pod selection for target discovery by Prometheus.
-
objectspec.attachMetadataAttaches node metadata to discovered targets. Requires Prometheus v2.35.0 and above.
-
booleanspec.attachMetadata.nodeWhen set to true, Prometheus must have permissions to get Nodes.
-
-
stringspec.jobLabelThe label to use to retrieve the job name from.
-
integerspec.keepDroppedTargetsPer-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.
-
integerspec.labelLimitPer-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelNameLengthLimitPer-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelValueLengthLimitPer-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
objectspec.namespaceSelectorSelector to select which namespaces the Endpoints objects are discovered from.
-
booleanspec.namespaceSelector.anyBoolean describing whether all namespaces are selected in contrast to a list restricting them.
-
array of stringsspec.namespaceSelector.matchNamesList of namespace names to select from.
-
-
array of objectsspec.podMetricsEndpoints
Required value
A list of endpoints allowed as part of this PodMonitor.-
objectspec.podMetricsEndpoints.authorizationAuthorization section for this endpoint
-
objectspec.podMetricsEndpoints.authorization.credentialsSelects a key of a Secret in the namespace that contains the credentials for authentication.
-
stringspec.podMetricsEndpoints.authorization.credentials.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.authorization.credentials.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.authorization.credentials.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.podMetricsEndpoints.authorization.typeDefines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
-
-
objectspec.podMetricsEndpoints.basicAuthBasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint
-
objectspec.podMetricsEndpoints.basicAuth.passwordThe secret in the service monitor namespace that contains the password for authentication.
-
stringspec.podMetricsEndpoints.basicAuth.password.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.basicAuth.password.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.basicAuth.password.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.podMetricsEndpoints.basicAuth.usernameThe secret in the service monitor namespace that contains the username for authentication.
-
stringspec.podMetricsEndpoints.basicAuth.username.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.basicAuth.username.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.basicAuth.username.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.podMetricsEndpoints.bearerTokenSecretSecret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the pod monitor and accessible by the Prometheus Operator.
-
stringspec.podMetricsEndpoints.bearerTokenSecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.bearerTokenSecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.bearerTokenSecret.optionalSpecify whether the Secret or its key must be defined
-
-
booleanspec.podMetricsEndpoints.enableHttp2Whether to enable HTTP2.
-
booleanspec.podMetricsEndpoints.filterRunningDrop pods that are not running. (Failed, Succeeded). Enabled by default. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
-
booleanspec.podMetricsEndpoints.followRedirectsFollowRedirects configures whether scrape requests follow HTTP 3xx redirects.
-
booleanspec.podMetricsEndpoints.honorLabelsHonorLabels chooses the metric’s labels on collisions with target labels.
-
booleanspec.podMetricsEndpoints.honorTimestampsHonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
-
stringspec.podMetricsEndpoints.intervalInterval at which metrics should be scraped 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)?)$ -
array of objectsspec.podMetricsEndpoints.metricRelabelingsMetricRelabelConfigs to apply to samples before ingestion.
-
stringspec.podMetricsEndpoints.metricRelabelings.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.podMetricsEndpoints.metricRelabelings.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.podMetricsEndpoints.metricRelabelings.regexRegular expression against which the extracted value is matched.
-
stringspec.podMetricsEndpoints.metricRelabelings.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.podMetricsEndpoints.metricRelabelings.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.podMetricsEndpoints.metricRelabelings.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.podMetricsEndpoints.metricRelabelings.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.podMetricsEndpoints.metricRelabelings.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
objectspec.podMetricsEndpoints.oauth2OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.
-
objectspec.podMetricsEndpoints.oauth2.clientId
Required value
The secret or configmap containing the OAuth2 client id-
objectspec.podMetricsEndpoints.oauth2.clientId.configMapConfigMap containing data to use for the targets.
-
stringspec.podMetricsEndpoints.oauth2.clientId.configMap.key
Required value
The key to select. -
stringspec.podMetricsEndpoints.oauth2.clientId.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.oauth2.clientId.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.podMetricsEndpoints.oauth2.clientId.secretSecret containing data to use for the targets.
-
stringspec.podMetricsEndpoints.oauth2.clientId.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.oauth2.clientId.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.oauth2.clientId.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.podMetricsEndpoints.oauth2.clientSecret
Required value
The secret containing the OAuth2 client secret-
stringspec.podMetricsEndpoints.oauth2.clientSecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.oauth2.clientSecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.oauth2.clientSecret.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.podMetricsEndpoints.oauth2.endpointParamsParameters to append to the token URL
-
array of stringsspec.podMetricsEndpoints.oauth2.scopesOAuth2 scopes used for the token request
-
stringspec.podMetricsEndpoints.oauth2.tokenUrl
Required value
The URL to fetch the token fromMinimal length:
1
-
-
objectspec.podMetricsEndpoints.paramsOptional HTTP URL parameters
-
stringspec.podMetricsEndpoints.pathHTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g.
/metrics). -
stringspec.podMetricsEndpoints.portName of the pod port this endpoint refers to. Mutually exclusive with targetPort.
-
stringspec.podMetricsEndpoints.proxyUrlProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
-
array of objectsspec.podMetricsEndpoints.relabelingsRelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. The original scrape job’s name is available via the
__tmp_prometheus_job_namelabel. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config-
stringspec.podMetricsEndpoints.relabelings.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.podMetricsEndpoints.relabelings.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.podMetricsEndpoints.relabelings.regexRegular expression against which the extracted value is matched.
-
stringspec.podMetricsEndpoints.relabelings.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.podMetricsEndpoints.relabelings.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.podMetricsEndpoints.relabelings.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.podMetricsEndpoints.relabelings.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.podMetricsEndpoints.relabelings.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
stringspec.podMetricsEndpoints.schemeHTTP scheme to use for scraping.
httpandhttpsare the expected values unless you rewrite the__scheme__label via relabeling. If empty, Prometheus uses the default valuehttp.Allowed values:
http,https -
stringspec.podMetricsEndpoints.scrapeTimeoutTimeout after which the scrape is ended If not specified, the 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)?)$ -
integer or stringspec.podMetricsEndpoints.targetPortDeprecated: Use ‘port’ instead.
-
objectspec.podMetricsEndpoints.tlsConfigTLS configuration to use when scraping the endpoint.
-
objectspec.podMetricsEndpoints.tlsConfig.caCertificate authority used when verifying server certificates.
-
objectspec.podMetricsEndpoints.tlsConfig.ca.configMapConfigMap containing data to use for the targets.
-
stringspec.podMetricsEndpoints.tlsConfig.ca.configMap.key
Required value
The key to select. -
stringspec.podMetricsEndpoints.tlsConfig.ca.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.tlsConfig.ca.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.podMetricsEndpoints.tlsConfig.ca.secretSecret containing data to use for the targets.
-
stringspec.podMetricsEndpoints.tlsConfig.ca.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.tlsConfig.ca.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.tlsConfig.ca.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.podMetricsEndpoints.tlsConfig.certClient certificate to present when doing client-authentication.
-
objectspec.podMetricsEndpoints.tlsConfig.cert.configMapConfigMap containing data to use for the targets.
-
stringspec.podMetricsEndpoints.tlsConfig.cert.configMap.key
Required value
The key to select. -
stringspec.podMetricsEndpoints.tlsConfig.cert.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.tlsConfig.cert.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.podMetricsEndpoints.tlsConfig.cert.secretSecret containing data to use for the targets.
-
stringspec.podMetricsEndpoints.tlsConfig.cert.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.tlsConfig.cert.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.tlsConfig.cert.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
booleanspec.podMetricsEndpoints.tlsConfig.insecureSkipVerifyDisable target certificate validation.
-
objectspec.podMetricsEndpoints.tlsConfig.keySecretSecret containing the client key file for the targets.
-
stringspec.podMetricsEndpoints.tlsConfig.keySecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.podMetricsEndpoints.tlsConfig.keySecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.podMetricsEndpoints.tlsConfig.keySecret.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.podMetricsEndpoints.tlsConfig.serverNameUsed to verify the hostname for the targets.
-
-
-
array of stringsspec.podTargetLabelsPodTargetLabels transfers labels on the Kubernetes Pod onto the target.
-
integerspec.sampleLimitSampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
-
objectspec.selector
Required value
Selector to select Pod objects.-
array of objectsspec.selector.matchExpressionsmatchExpressions is a list of label selector requirements. The requirements are ANDed.
-
stringspec.selector.matchExpressions.keykey is the label key that the selector applies to.
-
stringspec.selector.matchExpressions.operatoroperator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
array of stringsspec.selector.matchExpressions.valuesvalues 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.
-
-
objectspec.selector.matchLabelsmatchLabels 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.
-
-
integerspec.targetLimitTargetLimit defines a limit on the number of scraped targets that will be accepted.
-
Probe
Scope: Namespaced
Version: v1
-
stringapiVersionAPIVersion 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
-
stringkindKind 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
-
objectmetadata
-
objectspecSpecification of desired Ingress selection for target discovery by Prometheus.
-
objectspec.authorizationAuthorization section for this endpoint
-
objectspec.authorization.credentialsSelects a key of a Secret in the namespace that contains the credentials for authentication.
-
stringspec.authorization.credentials.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.authorization.credentials.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.authorization.credentials.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.authorization.typeDefines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
-
-
objectspec.basicAuthBasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint
-
objectspec.basicAuth.passwordThe secret in the service monitor namespace that contains the password for authentication.
-
stringspec.basicAuth.password.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.basicAuth.password.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.basicAuth.password.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.basicAuth.usernameThe secret in the service monitor namespace that contains the username for authentication.
-
stringspec.basicAuth.username.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.basicAuth.username.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.basicAuth.username.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.bearerTokenSecretSecret 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.
-
stringspec.bearerTokenSecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.bearerTokenSecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.bearerTokenSecret.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.intervalInterval 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)?)$ -
stringspec.jobNameThe job name assigned to scraped metrics by default.
-
integerspec.keepDroppedTargetsPer-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.
-
integerspec.labelLimitPer-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelNameLengthLimitPer-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelValueLengthLimitPer-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
array of objectsspec.metricRelabelingsMetricRelabelConfigs to apply to samples before ingestion.
-
stringspec.metricRelabelings.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.metricRelabelings.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.metricRelabelings.regexRegular expression against which the extracted value is matched.
-
stringspec.metricRelabelings.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.metricRelabelings.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.metricRelabelings.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.metricRelabelings.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.metricRelabelings.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
stringspec.moduleThe 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
-
objectspec.oauth2OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.
-
objectspec.oauth2.clientId
Required value
The secret or configmap containing the OAuth2 client id-
objectspec.oauth2.clientId.configMapConfigMap containing data to use for the targets.
-
stringspec.oauth2.clientId.configMap.key
Required value
The key to select. -
stringspec.oauth2.clientId.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.oauth2.clientId.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.oauth2.clientId.secretSecret containing data to use for the targets.
-
stringspec.oauth2.clientId.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.oauth2.clientId.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.oauth2.clientId.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.oauth2.clientSecret
Required value
The secret containing the OAuth2 client secret-
stringspec.oauth2.clientSecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.oauth2.clientSecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.oauth2.clientSecret.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.oauth2.endpointParamsParameters to append to the token URL
-
array of stringsspec.oauth2.scopesOAuth2 scopes used for the token request
-
stringspec.oauth2.tokenUrl
Required value
The URL to fetch the token fromMinimal length:
1
-
-
objectspec.proberSpecification for the prober to use for probing targets. The prober.URL parameter is required. Targets cannot be probed if left empty.
-
stringspec.prober.pathPath to collect metrics from. Defaults to
/probe.Default:
/probe -
stringspec.prober.proxyUrlOptional ProxyURL.
-
stringspec.prober.schemeHTTP scheme to use for scraping.
httpandhttpsare the expected values unless you rewrite the__scheme__label via relabeling. If empty, Prometheus uses the default valuehttp.Allowed values:
http,https -
stringspec.prober.url
Required value
Mandatory URL of the prober.
-
-
integerspec.sampleLimitSampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
-
stringspec.scrapeTimeoutTimeout 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)?)$ -
integerspec.targetLimitTargetLimit defines a limit on the number of scraped targets that will be accepted.
-
objectspec.targetsTargets defines a set of static or dynamically discovered targets to probe.
-
objectspec.targets.ingressingress defines the Ingress objects to probe and the relabeling configuration. If
staticConfigis also defined,staticConfigtakes precedence.-
objectspec.targets.ingress.namespaceSelectorFrom which namespaces to select Ingress objects.
-
booleanspec.targets.ingress.namespaceSelector.anyBoolean describing whether all namespaces are selected in contrast to a list restricting them.
-
array of stringsspec.targets.ingress.namespaceSelector.matchNamesList of namespace names to select from.
-
-
array of objectsspec.targets.ingress.relabelingConfigsRelabelConfigs to apply to the label set of the target before it gets scraped. The original ingress address is available via the
__tmp_prometheus_ingress_addresslabel. It can be used to customize the probed URL. The original scrape job’s name is available via the__tmp_prometheus_job_namelabel. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config-
stringspec.targets.ingress.relabelingConfigs.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.targets.ingress.relabelingConfigs.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.targets.ingress.relabelingConfigs.regexRegular expression against which the extracted value is matched.
-
stringspec.targets.ingress.relabelingConfigs.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.targets.ingress.relabelingConfigs.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.targets.ingress.relabelingConfigs.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.targets.ingress.relabelingConfigs.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.targets.ingress.relabelingConfigs.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
objectspec.targets.ingress.selectorSelector to select the Ingress objects.
-
array of objectsspec.targets.ingress.selector.matchExpressionsmatchExpressions is a list of label selector requirements. The requirements are ANDed.
-
stringspec.targets.ingress.selector.matchExpressions.keykey is the label key that the selector applies to.
-
stringspec.targets.ingress.selector.matchExpressions.operatoroperator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
array of stringsspec.targets.ingress.selector.matchExpressions.valuesvalues 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.
-
-
objectspec.targets.ingress.selector.matchLabelsmatchLabels 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.
-
-
-
objectspec.targets.staticConfigstaticConfig defines the static list of targets to probe and the relabeling configuration. If
ingressis also defined,staticConfigtakes precedence. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config.-
objectspec.targets.staticConfig.labelsLabels assigned to all metrics scraped from the targets.
-
array of objectsspec.targets.staticConfig.relabelingConfigsRelabelConfigs 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
-
stringspec.targets.staticConfig.relabelingConfigs.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.targets.staticConfig.relabelingConfigs.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.targets.staticConfig.relabelingConfigs.regexRegular expression against which the extracted value is matched.
-
stringspec.targets.staticConfig.relabelingConfigs.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.targets.staticConfig.relabelingConfigs.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.targets.staticConfig.relabelingConfigs.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.targets.staticConfig.relabelingConfigs.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.targets.staticConfig.relabelingConfigs.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
array of stringsspec.targets.staticConfig.staticThe list of hosts to probe.
-
-
-
objectspec.tlsConfigTLS configuration to use when scraping the endpoint.
-
objectspec.tlsConfig.caCertificate authority used when verifying server certificates.
-
objectspec.tlsConfig.ca.configMapConfigMap containing data to use for the targets.
-
stringspec.tlsConfig.ca.configMap.key
Required value
The key to select. -
stringspec.tlsConfig.ca.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.ca.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.tlsConfig.ca.secretSecret containing data to use for the targets.
-
stringspec.tlsConfig.ca.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.tlsConfig.ca.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.ca.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.tlsConfig.certClient certificate to present when doing client-authentication.
-
objectspec.tlsConfig.cert.configMapConfigMap containing data to use for the targets.
-
stringspec.tlsConfig.cert.configMap.key
Required value
The key to select. -
stringspec.tlsConfig.cert.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.cert.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.tlsConfig.cert.secretSecret containing data to use for the targets.
-
stringspec.tlsConfig.cert.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.tlsConfig.cert.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.cert.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
booleanspec.tlsConfig.insecureSkipVerifyDisable target certificate validation.
-
objectspec.tlsConfig.keySecretSecret containing the client key file for the targets.
-
stringspec.tlsConfig.keySecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.tlsConfig.keySecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.keySecret.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.tlsConfig.serverNameUsed to verify the hostname for the targets.
-
-
ScrapeConfig
Scope: Namespaced
Version: v1alpha1
-
stringapiVersionAPIVersion 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
-
stringkindKind 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
-
objectmetadata
-
objectspecScrapeConfigSpec is a specification of the desired configuration for a scrape configuration.
-
objectspec.authorizationAuthorization header to use on every scrape request.
-
objectspec.authorization.credentialsSelects a key of a Secret in the namespace that contains the credentials for authentication.
-
stringspec.authorization.credentials.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.authorization.credentials.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.authorization.credentials.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.authorization.typeDefines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
-
-
objectspec.basicAuthBasicAuth information to use on every scrape request.
-
objectspec.basicAuth.passwordThe secret in the service monitor namespace that contains the password for authentication.
-
stringspec.basicAuth.password.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.basicAuth.password.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.basicAuth.password.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.basicAuth.usernameThe secret in the service monitor namespace that contains the username for authentication.
-
stringspec.basicAuth.username.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.basicAuth.username.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.basicAuth.username.optionalSpecify whether the Secret or its key must be defined
-
-
-
array of objectsspec.consulSDConfigsConsulSDConfigs defines a list of Consul service discovery configurations.
-
booleanspec.consulSDConfigs.allow_staleAllow stale Consul results (see https://www.consul.io/api/features/consistency.html). Will reduce load on Consul. If unset, Prometheus uses its default value.
-
objectspec.consulSDConfigs.authorizationAuthorization header configuration to authenticate against the Consul Server.
-
objectspec.consulSDConfigs.authorization.credentialsSelects a key of a Secret in the namespace that contains the credentials for authentication.
-
stringspec.consulSDConfigs.authorization.credentials.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.authorization.credentials.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.authorization.credentials.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.consulSDConfigs.authorization.typeDefines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
-
-
objectspec.consulSDConfigs.basicAuthBasicAuth information to authenticate against the Consul Server. More info: https://prometheus.io/docs/operating/configuration/#endpoints
-
objectspec.consulSDConfigs.basicAuth.passwordThe secret in the service monitor namespace that contains the password for authentication.
-
stringspec.consulSDConfigs.basicAuth.password.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.basicAuth.password.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.basicAuth.password.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.consulSDConfigs.basicAuth.usernameThe secret in the service monitor namespace that contains the username for authentication.
-
stringspec.consulSDConfigs.basicAuth.username.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.basicAuth.username.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.basicAuth.username.optionalSpecify whether the Secret or its key must be defined
-
-
-
stringspec.consulSDConfigs.datacenterConsul Datacenter name, if not provided it will use the local Consul Agent Datacenter.
-
booleanspec.consulSDConfigs.enable_http2Whether to enable HTTP2. If unset, Prometheus uses its default value.
-
booleanspec.consulSDConfigs.follow_redirectsConfigure whether HTTP requests follow HTTP 3xx redirects. If unset, Prometheus uses its default value.
-
stringspec.consulSDConfigs.namespaceNamespaces are only supported in Consul Enterprise.
-
stringspec.consulSDConfigs.no_proxyComma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying. IP and domain names can contain port numbers.
-
objectspec.consulSDConfigs.node_metaNode metadata key/value pairs to filter nodes for a given service.
-
objectspec.consulSDConfigs.oauth2Optional OAuth 2.0 configuration.
-
objectspec.consulSDConfigs.oauth2.clientId
Required value
The secret or configmap containing the OAuth2 client id-
objectspec.consulSDConfigs.oauth2.clientId.configMapConfigMap containing data to use for the targets.
-
stringspec.consulSDConfigs.oauth2.clientId.configMap.key
Required value
The key to select. -
stringspec.consulSDConfigs.oauth2.clientId.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.oauth2.clientId.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.consulSDConfigs.oauth2.clientId.secretSecret containing data to use for the targets.
-
stringspec.consulSDConfigs.oauth2.clientId.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.oauth2.clientId.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.oauth2.clientId.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.consulSDConfigs.oauth2.clientSecret
Required value
The secret containing the OAuth2 client secret-
stringspec.consulSDConfigs.oauth2.clientSecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.oauth2.clientSecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.oauth2.clientSecret.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.consulSDConfigs.oauth2.endpointParamsParameters to append to the token URL
-
array of stringsspec.consulSDConfigs.oauth2.scopesOAuth2 scopes used for the token request
-
stringspec.consulSDConfigs.oauth2.tokenUrl
Required value
The URL to fetch the token fromMinimal length:
1
-
-
stringspec.consulSDConfigs.partitionAdmin Partitions are only supported in Consul Enterprise.
-
objectspec.consulSDConfigs.proxy_connect_headerSpecifies headers to send to proxies during CONNECT requests.
-
objectspec.consulSDConfigs.proxy_connect_header.<KEY_NAME>
<KEY_NAME>— item (key) name.SecretKeySelector selects a key of a Secret.
-
stringspec.consulSDConfigs.proxy_connect_header.<KEY_NAME>.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.proxy_connect_header.<KEY_NAME>.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.proxy_connect_header.<KEY_NAME>.optionalSpecify whether the Secret or its key must be defined
-
-
-
booleanspec.consulSDConfigs.proxy_from_environmentUse proxy URL indicated by environment variables (HTTP_PROXY, https_proxy, HTTPs_PROXY, https_proxy, and no_proxy) If unset, Prometheus uses its default value.
-
stringspec.consulSDConfigs.proxy_urlOptional proxy URL.
-
stringspec.consulSDConfigs.refresh_intervalThe time after which the provided names are refreshed. On large setup it might be a good idea to increase this value because the catalog will change all the time. If unset, Prometheus uses its default value.
Pattern:
^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ -
stringspec.consulSDConfigs.schemeHTTP Scheme default “http”
Allowed values:
HTTP,HTTPS -
stringspec.consulSDConfigs.serverA valid string consisting of a hostname or IP followed by an optional port number.
Minimal length:
1 -
array of stringsspec.consulSDConfigs.servicesA list of services for which targets are retrieved. If omitted, all services are scraped.
-
stringspec.consulSDConfigs.tag_separatorThe string by which Consul tags are joined into the tag label. If unset, Prometheus uses its default value.
-
array of stringsspec.consulSDConfigs.tagsAn optional list of tags used to filter nodes for a given service. Services must contain all tags in the list.
-
objectspec.consulSDConfigs.tlsConfigTLS Config
-
objectspec.consulSDConfigs.tlsConfig.caCertificate authority used when verifying server certificates.
-
objectspec.consulSDConfigs.tlsConfig.ca.configMapConfigMap containing data to use for the targets.
-
stringspec.consulSDConfigs.tlsConfig.ca.configMap.key
Required value
The key to select. -
stringspec.consulSDConfigs.tlsConfig.ca.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.tlsConfig.ca.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.consulSDConfigs.tlsConfig.ca.secretSecret containing data to use for the targets.
-
stringspec.consulSDConfigs.tlsConfig.ca.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.tlsConfig.ca.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.tlsConfig.ca.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.consulSDConfigs.tlsConfig.certClient certificate to present when doing client-authentication.
-
objectspec.consulSDConfigs.tlsConfig.cert.configMapConfigMap containing data to use for the targets.
-
stringspec.consulSDConfigs.tlsConfig.cert.configMap.key
Required value
The key to select. -
stringspec.consulSDConfigs.tlsConfig.cert.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.tlsConfig.cert.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.consulSDConfigs.tlsConfig.cert.secretSecret containing data to use for the targets.
-
stringspec.consulSDConfigs.tlsConfig.cert.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.tlsConfig.cert.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.tlsConfig.cert.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
booleanspec.consulSDConfigs.tlsConfig.insecureSkipVerifyDisable target certificate validation.
-
objectspec.consulSDConfigs.tlsConfig.keySecretSecret containing the client key file for the targets.
-
stringspec.consulSDConfigs.tlsConfig.keySecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.tlsConfig.keySecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.tlsConfig.keySecret.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.consulSDConfigs.tlsConfig.serverNameUsed to verify the hostname for the targets.
-
-
objectspec.consulSDConfigs.tokenRefConsul ACL TokenRef, if not provided it will use the ACL from the local Consul Agent.
-
stringspec.consulSDConfigs.tokenRef.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.consulSDConfigs.tokenRef.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.consulSDConfigs.tokenRef.optionalSpecify whether the Secret or its key must be defined
-
-
-
array of objectsspec.dnsSDConfigsDNSSDConfigs defines a list of DNS service discovery configurations.
-
array of stringsspec.dnsSDConfigs.namesA list of DNS domain names to be queried.
-
integerspec.dnsSDConfigs.portThe port number used if the query type is not SRV Ignored for SRV records
-
stringspec.dnsSDConfigs.refreshIntervalRefreshInterval configures the time after which the provided names are refreshed. If not set, Prometheus uses its default value.
Pattern:
^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ -
stringspec.dnsSDConfigs.typeThe type of DNS query to perform. One of SRV, A, AAAA or MX. If not set, Prometheus uses its default value.
Allowed values:
SRV,A,AAAA,MX
-
-
array of objectsspec.fileSDConfigsFileSDConfigs defines a list of file service discovery configurations.
-
array of stringsspec.fileSDConfigs.filesList of files to be used for file discovery. Recommendation: use absolute paths. While relative paths work, the prometheus-operator project makes no guarantees about the working directory where the configuration file is stored. Files must be mounted using Prometheus.ConfigMaps or Prometheus.Secrets.
-
stringspec.fileSDConfigs.files.Element of the arraySDFile represents a file used for service discovery
Pattern:
^[^*]*(\*[^/]*)?\.(json|yml|yaml|JSON|YML|YAML)$
-
-
stringspec.fileSDConfigs.refreshIntervalRefreshInterval configures the refresh interval at which Prometheus will reload the content of the files.
Pattern:
^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
-
-
booleanspec.honorLabelsHonorLabels chooses the metric’s labels on collisions with target labels.
-
booleanspec.honorTimestampsHonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
-
array of objectsspec.httpSDConfigsHTTPSDConfigs defines a list of HTTP service discovery configurations.
-
objectspec.httpSDConfigs.authorizationAuthorization header configuration to authenticate against the target HTTP endpoint.
-
objectspec.httpSDConfigs.authorization.credentialsSelects a key of a Secret in the namespace that contains the credentials for authentication.
-
stringspec.httpSDConfigs.authorization.credentials.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.httpSDConfigs.authorization.credentials.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.authorization.credentials.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.httpSDConfigs.authorization.typeDefines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
-
-
objectspec.httpSDConfigs.basicAuthBasicAuth information to authenticate against the target HTTP endpoint. More info: https://prometheus.io/docs/operating/configuration/#endpoints
-
objectspec.httpSDConfigs.basicAuth.passwordThe secret in the service monitor namespace that contains the password for authentication.
-
stringspec.httpSDConfigs.basicAuth.password.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.httpSDConfigs.basicAuth.password.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.basicAuth.password.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.httpSDConfigs.basicAuth.usernameThe secret in the service monitor namespace that contains the username for authentication.
-
stringspec.httpSDConfigs.basicAuth.username.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.httpSDConfigs.basicAuth.username.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.basicAuth.username.optionalSpecify whether the Secret or its key must be defined
-
-
-
stringspec.httpSDConfigs.refreshIntervalRefreshInterval configures the refresh interval at which Prometheus will re-query the endpoint to update the target list.
Pattern:
^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ -
objectspec.httpSDConfigs.tlsConfigTLS configuration applying to the target HTTP endpoint.
-
objectspec.httpSDConfigs.tlsConfig.caCertificate authority used when verifying server certificates.
-
objectspec.httpSDConfigs.tlsConfig.ca.configMapConfigMap containing data to use for the targets.
-
stringspec.httpSDConfigs.tlsConfig.ca.configMap.key
Required value
The key to select. -
stringspec.httpSDConfigs.tlsConfig.ca.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.tlsConfig.ca.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.httpSDConfigs.tlsConfig.ca.secretSecret containing data to use for the targets.
-
stringspec.httpSDConfigs.tlsConfig.ca.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.httpSDConfigs.tlsConfig.ca.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.tlsConfig.ca.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.httpSDConfigs.tlsConfig.certClient certificate to present when doing client-authentication.
-
objectspec.httpSDConfigs.tlsConfig.cert.configMapConfigMap containing data to use for the targets.
-
stringspec.httpSDConfigs.tlsConfig.cert.configMap.key
Required value
The key to select. -
stringspec.httpSDConfigs.tlsConfig.cert.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.tlsConfig.cert.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.httpSDConfigs.tlsConfig.cert.secretSecret containing data to use for the targets.
-
stringspec.httpSDConfigs.tlsConfig.cert.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.httpSDConfigs.tlsConfig.cert.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.tlsConfig.cert.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
booleanspec.httpSDConfigs.tlsConfig.insecureSkipVerifyDisable target certificate validation.
-
objectspec.httpSDConfigs.tlsConfig.keySecretSecret containing the client key file for the targets.
-
stringspec.httpSDConfigs.tlsConfig.keySecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.httpSDConfigs.tlsConfig.keySecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.httpSDConfigs.tlsConfig.keySecret.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.httpSDConfigs.tlsConfig.serverNameUsed to verify the hostname for the targets.
-
-
stringspec.httpSDConfigs.urlURL from which the targets are fetched.
Minimal length:
1Pattern:
^http(s)?://.+$
-
-
integerspec.keepDroppedTargetsPer-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.
-
array of objectsspec.kubernetesSDConfigsKubernetesSDConfigs defines a list of Kubernetes service discovery configurations.
-
stringspec.kubernetesSDConfigs.roleRole of the Kubernetes entities that should be discovered. Currently the only supported role is “Node”.
Allowed values:
Node
-
-
integerspec.labelLimitPer-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelNameLengthLimitPer-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelValueLengthLimitPer-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
array of objectsspec.metricRelabelingsMetricRelabelConfigs to apply to samples before ingestion.
-
stringspec.metricRelabelings.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.metricRelabelings.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.metricRelabelings.regexRegular expression against which the extracted value is matched.
-
stringspec.metricRelabelings.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.metricRelabelings.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.metricRelabelings.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.metricRelabelings.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.metricRelabelings.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
stringspec.metricsPathMetricsPath HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g. /metrics).
-
objectspec.paramsOptional HTTP URL parameters
-
array of objectsspec.relabelingsRelabelConfigs defines how to rewrite the target’s labels before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. The original scrape job’s name is available via the
__tmp_prometheus_job_namelabel. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config-
stringspec.relabelings.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.relabelings.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.relabelings.regexRegular expression against which the extracted value is matched.
-
stringspec.relabelings.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.relabelings.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.relabelings.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.relabelings.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.relabelings.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
integerspec.sampleLimitSampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
-
stringspec.schemeConfigures the protocol scheme used for requests. If empty, Prometheus uses HTTP by default.
Allowed values:
HTTP,HTTPS -
stringspec.scrapeIntervalScrapeInterval is the interval between consecutive scrapes.
Pattern:
^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ -
stringspec.scrapeTimeoutScrapeTimeout is the number of seconds to wait until a scrape request times out.
Pattern:
^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ -
array of objectsspec.staticConfigsStaticConfigs defines a list of static targets with a common label set.
-
objectspec.staticConfigs.labelsLabels assigned to all metrics scraped from the targets.
-
array of stringsspec.staticConfigs.targetsList of targets for this static configuration.
-
stringspec.staticConfigs.targets.Element of the arrayTarget represents a target for Prometheus to scrape
-
-
-
integerspec.targetLimitTargetLimit defines a limit on the number of scraped targets that will be accepted.
-
objectspec.tlsConfigTLS configuration to use on every scrape request
-
objectspec.tlsConfig.caCertificate authority used when verifying server certificates.
-
objectspec.tlsConfig.ca.configMapConfigMap containing data to use for the targets.
-
stringspec.tlsConfig.ca.configMap.key
Required value
The key to select. -
stringspec.tlsConfig.ca.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.ca.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.tlsConfig.ca.secretSecret containing data to use for the targets.
-
stringspec.tlsConfig.ca.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.tlsConfig.ca.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.ca.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.tlsConfig.certClient certificate to present when doing client-authentication.
-
objectspec.tlsConfig.cert.configMapConfigMap containing data to use for the targets.
-
stringspec.tlsConfig.cert.configMap.key
Required value
The key to select. -
stringspec.tlsConfig.cert.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.cert.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.tlsConfig.cert.secretSecret containing data to use for the targets.
-
stringspec.tlsConfig.cert.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.tlsConfig.cert.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.cert.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
booleanspec.tlsConfig.insecureSkipVerifyDisable target certificate validation.
-
objectspec.tlsConfig.keySecretSecret containing the client key file for the targets.
-
stringspec.tlsConfig.keySecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.tlsConfig.keySecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.tlsConfig.keySecret.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.tlsConfig.serverNameUsed to verify the hostname for the targets.
-
-
ServiceMonitor
Scope: Namespaced
Version: v1
-
stringapiVersionAPIVersion 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
-
stringkindKind 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
-
objectmetadata
-
objectspecSpecification of desired Service selection for target discovery by Prometheus.
-
objectspec.attachMetadataAttaches node metadata to discovered targets. Requires Prometheus v2.37.0 and above.
-
booleanspec.attachMetadata.nodeWhen set to true, Prometheus must have permissions to get Nodes.
-
-
array of objectsspec.endpoints
Required value
A list of endpoints allowed as part of this ServiceMonitor.-
objectspec.endpoints.authorizationAuthorization section for this endpoint
-
objectspec.endpoints.authorization.credentialsSelects a key of a Secret in the namespace that contains the credentials for authentication.
-
stringspec.endpoints.authorization.credentials.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.authorization.credentials.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.authorization.credentials.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.endpoints.authorization.typeDefines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
-
-
objectspec.endpoints.basicAuthBasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints
-
objectspec.endpoints.basicAuth.passwordThe secret in the service monitor namespace that contains the password for authentication.
-
stringspec.endpoints.basicAuth.password.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.basicAuth.password.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.basicAuth.password.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.endpoints.basicAuth.usernameThe secret in the service monitor namespace that contains the username for authentication.
-
stringspec.endpoints.basicAuth.username.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.basicAuth.username.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.basicAuth.username.optionalSpecify whether the Secret or its key must be defined
-
-
-
stringspec.endpoints.bearerTokenFileFile to read bearer token for scraping targets.
-
objectspec.endpoints.bearerTokenSecretSecret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the service monitor and accessible by the Prometheus Operator.
-
stringspec.endpoints.bearerTokenSecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.bearerTokenSecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.bearerTokenSecret.optionalSpecify whether the Secret or its key must be defined
-
-
booleanspec.endpoints.enableHttp2Whether to enable HTTP2.
-
booleanspec.endpoints.filterRunningDrop pods that are not running. (Failed, Succeeded). Enabled by default. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
-
booleanspec.endpoints.followRedirectsFollowRedirects configures whether scrape requests follow HTTP 3xx redirects.
-
booleanspec.endpoints.honorLabelsHonorLabels chooses the metric’s labels on collisions with target labels.
-
booleanspec.endpoints.honorTimestampsHonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
-
stringspec.endpoints.intervalInterval at which metrics should be scraped 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)?)$ -
array of objectsspec.endpoints.metricRelabelingsMetricRelabelConfigs to apply to samples before ingestion.
-
stringspec.endpoints.metricRelabelings.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.endpoints.metricRelabelings.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.endpoints.metricRelabelings.regexRegular expression against which the extracted value is matched.
-
stringspec.endpoints.metricRelabelings.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.endpoints.metricRelabelings.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.endpoints.metricRelabelings.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.endpoints.metricRelabelings.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.endpoints.metricRelabelings.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
objectspec.endpoints.oauth2OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.
-
objectspec.endpoints.oauth2.clientId
Required value
The secret or configmap containing the OAuth2 client id-
objectspec.endpoints.oauth2.clientId.configMapConfigMap containing data to use for the targets.
-
stringspec.endpoints.oauth2.clientId.configMap.key
Required value
The key to select. -
stringspec.endpoints.oauth2.clientId.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.oauth2.clientId.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.endpoints.oauth2.clientId.secretSecret containing data to use for the targets.
-
stringspec.endpoints.oauth2.clientId.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.oauth2.clientId.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.oauth2.clientId.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
objectspec.endpoints.oauth2.clientSecret
Required value
The secret containing the OAuth2 client secret-
stringspec.endpoints.oauth2.clientSecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.oauth2.clientSecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.oauth2.clientSecret.optionalSpecify whether the Secret or its key must be defined
-
-
objectspec.endpoints.oauth2.endpointParamsParameters to append to the token URL
-
array of stringsspec.endpoints.oauth2.scopesOAuth2 scopes used for the token request
-
stringspec.endpoints.oauth2.tokenUrl
Required value
The URL to fetch the token fromMinimal length:
1
-
-
objectspec.endpoints.paramsOptional HTTP URL parameters
-
stringspec.endpoints.pathHTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g.
/metrics). -
stringspec.endpoints.portName of the service port this endpoint refers to. Mutually exclusive with targetPort.
-
stringspec.endpoints.proxyUrlProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
-
array of objectsspec.endpoints.relabelingsRelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. The original scrape job’s name is available via the
__tmp_prometheus_job_namelabel. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config-
stringspec.endpoints.relabelings.actionAction to perform based on the regex matching.
UppercaseandLowercaseactions require Prometheus >= v2.36.0.DropEqualandKeepEqualactions require Prometheus >= v2.41.0. Default: “Replace”Default:
replaceAllowed values:
replace,Replace,keep,Keep,drop,Drop,hashmod,HashMod,labelmap,LabelMap,labeldrop,LabelDrop,labelkeep,LabelKeep,lowercase,Lowercase,uppercase,Uppercase,keepequal,KeepEqual,dropequal,DropEqual -
integerspec.endpoints.relabelings.modulusModulus to take of the hash of the source label values. Only applicable when the action is
HashMod. -
stringspec.endpoints.relabelings.regexRegular expression against which the extracted value is matched.
-
stringspec.endpoints.relabelings.replacementReplacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
-
stringspec.endpoints.relabelings.separatorSeparator is the string between concatenated SourceLabels.
-
array of stringsspec.endpoints.relabelings.sourceLabelsThe source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
-
stringspec.endpoints.relabelings.sourceLabels.Element of the arrayLabelName 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_]*$
-
-
stringspec.endpoints.relabelings.targetLabelLabel to which the resulting string is written in a replacement. It is mandatory for
Replace,HashMod,Lowercase,Uppercase,KeepEqualandDropEqualactions. Regex capture groups are available.
-
-
stringspec.endpoints.schemeHTTP scheme to use for scraping.
httpandhttpsare the expected values unless you rewrite the__scheme__label via relabeling. If empty, Prometheus uses the default valuehttp.Allowed values:
http,https -
stringspec.endpoints.scrapeTimeoutTimeout after which the scrape is ended If not specified, the Prometheus global scrape timeout is used unless it is less than
Intervalin which the latter 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)?)$ -
integer or stringspec.endpoints.targetPortName or number of the target port of the Pod behind the Service, the port must be specified with container port property. Mutually exclusive with port.
-
objectspec.endpoints.tlsConfigTLS configuration to use when scraping the endpoint
-
objectspec.endpoints.tlsConfig.caCertificate authority used when verifying server certificates.
-
objectspec.endpoints.tlsConfig.ca.configMapConfigMap containing data to use for the targets.
-
stringspec.endpoints.tlsConfig.ca.configMap.key
Required value
The key to select. -
stringspec.endpoints.tlsConfig.ca.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.tlsConfig.ca.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.endpoints.tlsConfig.ca.secretSecret containing data to use for the targets.
-
stringspec.endpoints.tlsConfig.ca.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.tlsConfig.ca.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.tlsConfig.ca.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
stringspec.endpoints.tlsConfig.caFilePath to the CA cert in the Prometheus container to use for the targets.
-
objectspec.endpoints.tlsConfig.certClient certificate to present when doing client-authentication.
-
objectspec.endpoints.tlsConfig.cert.configMapConfigMap containing data to use for the targets.
-
stringspec.endpoints.tlsConfig.cert.configMap.key
Required value
The key to select. -
stringspec.endpoints.tlsConfig.cert.configMap.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.tlsConfig.cert.configMap.optionalSpecify whether the ConfigMap or its key must be defined
-
-
objectspec.endpoints.tlsConfig.cert.secretSecret containing data to use for the targets.
-
stringspec.endpoints.tlsConfig.cert.secret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.tlsConfig.cert.secret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.tlsConfig.cert.secret.optionalSpecify whether the Secret or its key must be defined
-
-
-
stringspec.endpoints.tlsConfig.certFilePath to the client cert file in the Prometheus container for the targets.
-
booleanspec.endpoints.tlsConfig.insecureSkipVerifyDisable target certificate validation.
-
stringspec.endpoints.tlsConfig.keyFilePath to the client key file in the Prometheus container for the targets.
-
objectspec.endpoints.tlsConfig.keySecretSecret containing the client key file for the targets.
-
stringspec.endpoints.tlsConfig.keySecret.key
Required value
The key of the secret to select from. Must be a valid secret key. -
stringspec.endpoints.tlsConfig.keySecret.nameName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
booleanspec.endpoints.tlsConfig.keySecret.optionalSpecify whether the Secret or its key must be defined
-
-
stringspec.endpoints.tlsConfig.serverNameUsed to verify the hostname for the targets.
-
-
-
stringspec.jobLabelJobLabel selects the label from the associated Kubernetes service which will be used as the
joblabel for all metrics. For example: If inServiceMonitor.spec.jobLabel: fooand inService.metadata.labels.foo: bar, then thejob="bar"label is added to all metrics. If the value of this field is empty or if the label doesn’t exist for the given Service, thejoblabel of the metrics defaults to the name of the Kubernetes Service. -
integerspec.keepDroppedTargetsPer-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.
-
integerspec.labelLimitPer-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelNameLengthLimitPer-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
integerspec.labelValueLengthLimitPer-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
-
objectspec.namespaceSelectorSelector to select which namespaces the Kubernetes Endpoints objects are discovered from.
-
booleanspec.namespaceSelector.anyBoolean describing whether all namespaces are selected in contrast to a list restricting them.
-
array of stringsspec.namespaceSelector.matchNamesList of namespace names to select from.
-
-
array of stringsspec.podTargetLabelsPodTargetLabels transfers labels on the Kubernetes
Podonto the created metrics. -
integerspec.sampleLimitSampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
-
objectspec.selector
Required value
Selector to select Endpoints objects.-
array of objectsspec.selector.matchExpressionsmatchExpressions is a list of label selector requirements. The requirements are ANDed.
-
stringspec.selector.matchExpressions.keykey is the label key that the selector applies to.
-
stringspec.selector.matchExpressions.operatoroperator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
array of stringsspec.selector.matchExpressions.valuesvalues 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.
-
-
objectspec.selector.matchLabelsmatchLabels 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.
-
-
array of stringsspec.targetLabelsTargetLabels transfers labels from the Kubernetes
Serviceonto the created metrics. -
integerspec.targetLimitTargetLimit defines a limit on the number of scraped targets that will be accepted.
-