PodMonitor
Scope: Namespaced
Version: v1
PodMonitor defines monitoring for a set of pods.
- stringapiVersion
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
- stringkind
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
- objectmetadata
- objectspec
Required value
Specification of desired Pod selection for target discovery by Prometheus.
- objectspec.attachMetadata
Attaches node metadata to discovered targets. Requires Prometheus v2.35.0 and above.
- booleanspec.attachMetadata.node
When set to true, Prometheus must have permissions to get Nodes.
- stringspec.jobLabel
The label to use to retrieve the job name from.
- integerspec.keepDroppedTargets
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.
- integerspec.labelLimit
Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
- integerspec.labelNameLengthLimit
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.
- integerspec.labelValueLengthLimit
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.
- objectspec.namespaceSelector
Selector to select which namespaces the Endpoints objects are discovered from.
- booleanspec.namespaceSelector.any
Boolean describing whether all namespaces are selected in contrast to a list restricting them.
- array of stringsspec.namespaceSelector.matchNames
List of namespace names to select from.
- array of objectsspec.podMetricsEndpoints
Required value
A list of endpoints allowed as part of this PodMonitor.
PodMetricsEndpoint defines a scrapeable endpoint of a Kubernetes Pod serving Prometheus metrics.
- object
Authorization section for this endpoint
- object
Selects a key of a Secret in the namespace that contains the credentials for authentication.
- string
Required value
The key of the secret to select from. Must be a valid secret key.
- string
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- boolean
Specify whether the Secret or its key must be defined
- string
Defines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
- objectspec.podMetricsEndpoints.basicAuth
BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint
- objectspec.podMetricsEndpoints.basicAuth.password
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.basicAuth.password.optional
Specify whether the Secret or its key must be defined
- objectspec.podMetricsEndpoints.basicAuth.username
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.basicAuth.username.optional
Specify whether the Secret or its key must be defined
- objectspec.podMetricsEndpoints.bearerTokenSecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.bearerTokenSecret.optional
Specify whether the Secret or its key must be defined
- booleanspec.podMetricsEndpoints.enableHttp2
Whether to enable HTTP2.
- booleanspec.podMetricsEndpoints.filterRunning
Drop 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.followRedirects
FollowRedirects configures whether scrape requests follow HTTP 3xx redirects.
- booleanspec.podMetricsEndpoints.honorLabels
HonorLabels chooses the metric’s labels on collisions with target labels.
- booleanspec.podMetricsEndpoints.honorTimestamps
HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
- stringspec.podMetricsEndpoints.interval
Interval 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.metricRelabelings
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
- stringspec.podMetricsEndpoints.metricRelabelings.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.podMetricsEndpoints.metricRelabelings.regex
Regular expression against which the extracted value is matched.
- stringspec.podMetricsEndpoints.metricRelabelings.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.podMetricsEndpoints.metricRelabelings.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.podMetricsEndpoints.metricRelabelings.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.podMetricsEndpoints.metricRelabelings.targetLabel
Label 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.oauth2
OAuth2 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.configMap
ConfigMap containing data to use for the targets.
- stringspec.podMetricsEndpoints.oauth2.clientId.configMap.key
Required value
The key to select.
- stringspec.podMetricsEndpoints.oauth2.clientId.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.oauth2.clientId.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.podMetricsEndpoints.oauth2.clientId.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.oauth2.clientId.secret.optional
Specify 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.oauth2.clientSecret.optional
Specify whether the Secret or its key must be defined
- objectspec.podMetricsEndpoints.oauth2.endpointParams
Parameters to append to the token URL
- array of stringsspec.podMetricsEndpoints.oauth2.scopes
OAuth2 scopes used for the token request
- stringspec.podMetricsEndpoints.oauth2.tokenUrl
Required value
The URL to fetch the token from
- objectspec.podMetricsEndpoints.params
Optional HTTP URL parameters
- stringspec.podMetricsEndpoints.path
HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g.
/metrics). - stringspec.podMetricsEndpoints.port
Name of the pod port this endpoint refers to. Mutually exclusive with targetPort.
- stringspec.podMetricsEndpoints.proxyUrl
ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
- array of objectsspec.podMetricsEndpoints.relabelings
RelabelConfigs 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_configRelabelConfig 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
- stringspec.podMetricsEndpoints.relabelings.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.podMetricsEndpoints.relabelings.regex
Regular expression against which the extracted value is matched.
- stringspec.podMetricsEndpoints.relabelings.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.podMetricsEndpoints.relabelings.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.podMetricsEndpoints.relabelings.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.podMetricsEndpoints.relabelings.targetLabel
Label 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.scheme
HTTP 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.scrapeTimeout
Timeout 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.targetPort
Deprecated: Use ‘port’ instead.
- objectspec.podMetricsEndpoints.tlsConfig
TLS configuration to use when scraping the endpoint.
- objectspec.podMetricsEndpoints.tlsConfig.ca
Certificate authority used when verifying server certificates.
- objectspec.podMetricsEndpoints.tlsConfig.ca.configMap
ConfigMap containing data to use for the targets.
- stringspec.podMetricsEndpoints.tlsConfig.ca.configMap.key
Required value
The key to select.
- stringspec.podMetricsEndpoints.tlsConfig.ca.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.tlsConfig.ca.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.podMetricsEndpoints.tlsConfig.ca.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.tlsConfig.ca.secret.optional
Specify whether the Secret or its key must be defined
- objectspec.podMetricsEndpoints.tlsConfig.cert
Client certificate to present when doing client-authentication.
- objectspec.podMetricsEndpoints.tlsConfig.cert.configMap
ConfigMap containing data to use for the targets.
- stringspec.podMetricsEndpoints.tlsConfig.cert.configMap.key
Required value
The key to select.
- stringspec.podMetricsEndpoints.tlsConfig.cert.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.tlsConfig.cert.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.podMetricsEndpoints.tlsConfig.cert.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.tlsConfig.cert.secret.optional
Specify whether the Secret or its key must be defined
- booleanspec.podMetricsEndpoints.tlsConfig.insecureSkipVerify
Disable target certificate validation.
- objectspec.podMetricsEndpoints.tlsConfig.keySecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.podMetricsEndpoints.tlsConfig.keySecret.optional
Specify whether the Secret or its key must be defined
- stringspec.podMetricsEndpoints.tlsConfig.serverName
Used to verify the hostname for the targets.
- array of stringsspec.podTargetLabels
PodTargetLabels transfers labels on the Kubernetes Pod onto the target.
- integerspec.sampleLimit
SampleLimit 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.matchExpressions
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.
- stringspec.selector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringspec.selector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringsspec.selector.matchExpressions.values
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.
- objectspec.selector.matchLabels
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.
- integerspec.targetLimit
TargetLimit defines a limit on the number of scraped targets that will be accepted.
Probe
Scope: Namespaced
Version: v1
Probe defines monitoring for a set of static targets or ingresses.
- stringapiVersion
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
- stringkind
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
- objectmetadata
- objectspec
Required value
Specification of desired Ingress selection for target discovery by Prometheus.
- object
Authorization section for this endpoint
- object
Selects a key of a Secret in the namespace that contains the credentials for authentication.
- string
Required value
The key of the secret to select from. Must be a valid secret key.
- string
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- boolean
Specify whether the Secret or its key must be defined
- string
Defines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
- objectspec.basicAuth
BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint
- objectspec.basicAuth.password
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.basicAuth.password.optional
Specify whether the Secret or its key must be defined
- objectspec.basicAuth.username
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.basicAuth.username.optional
Specify whether the Secret or its key must be defined
- objectspec.bearerTokenSecret
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.
- stringspec.bearerTokenSecret.key
Required value
The key of the secret to select from. Must be a valid secret key.
- stringspec.bearerTokenSecret.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.bearerTokenSecret.optional
Specify whether the Secret or its key must be defined
- stringspec.interval
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)?)$ - stringspec.jobName
The job name assigned to scraped metrics by default.
- integerspec.keepDroppedTargets
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.
- integerspec.labelLimit
Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
- integerspec.labelNameLengthLimit
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.
- integerspec.labelValueLengthLimit
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.
- array of objectsspec.metricRelabelings
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
- stringspec.metricRelabelings.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.metricRelabelings.regex
Regular expression against which the extracted value is matched.
- stringspec.metricRelabelings.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.metricRelabelings.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.metricRelabelings.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.metricRelabelings.targetLabel
Label 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.module
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
- objectspec.oauth2
OAuth2 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.configMap
ConfigMap containing data to use for the targets.
- stringspec.oauth2.clientId.configMap.key
Required value
The key to select.
- stringspec.oauth2.clientId.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.oauth2.clientId.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.oauth2.clientId.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.oauth2.clientId.secret.optional
Specify 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.oauth2.clientSecret.optional
Specify whether the Secret or its key must be defined
- objectspec.oauth2.endpointParams
Parameters to append to the token URL
- array of stringsspec.oauth2.scopes
OAuth2 scopes used for the token request
- stringspec.oauth2.tokenUrl
Required value
The URL to fetch the token from
- objectspec.prober
Specification for the prober to use for probing targets. The prober.URL parameter is required. Targets cannot be probed if left empty.
- stringspec.prober.path
Path to collect metrics from. Defaults to
/probe.Default:
/probe - stringspec.prober.proxyUrl
Optional ProxyURL.
- stringspec.prober.scheme
HTTP 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.sampleLimit
SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
- stringspec.scrapeTimeout
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)?)$ - integerspec.targetLimit
TargetLimit defines a limit on the number of scraped targets that will be accepted.
- objectspec.targets
Targets defines a set of static or dynamically discovered targets to probe.
- objectspec.targets.ingress
ingress defines the Ingress objects to probe and the relabeling configuration. If
staticConfigis also defined,staticConfigtakes precedence.- objectspec.targets.ingress.namespaceSelector
From which namespaces to select Ingress objects.
- booleanspec.targets.ingress.namespaceSelector.any
Boolean describing whether all namespaces are selected in contrast to a list restricting them.
- array of stringsspec.targets.ingress.namespaceSelector.matchNames
List of namespace names to select from.
- array of objectsspec.targets.ingress.relabelingConfigs
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_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_configRelabelConfig 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
- stringspec.targets.ingress.relabelingConfigs.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.targets.ingress.relabelingConfigs.regex
Regular expression against which the extracted value is matched.
- stringspec.targets.ingress.relabelingConfigs.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.targets.ingress.relabelingConfigs.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.targets.ingress.relabelingConfigs.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.targets.ingress.relabelingConfigs.targetLabel
Label 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.selector
Selector to select the Ingress objects.
- array of objectsspec.targets.ingress.selector.matchExpressions
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.
- stringspec.targets.ingress.selector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringspec.targets.ingress.selector.matchExpressions.operator
Required value
operator 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.values
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.
- objectspec.targets.ingress.selector.matchLabels
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.
- objectspec.targets.staticConfig
staticConfig 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.labels
Labels assigned to all metrics scraped from the targets.
- array of objectsspec.targets.staticConfig.relabelingConfigs
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
- stringspec.targets.staticConfig.relabelingConfigs.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.targets.staticConfig.relabelingConfigs.regex
Regular expression against which the extracted value is matched.
- stringspec.targets.staticConfig.relabelingConfigs.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.targets.staticConfig.relabelingConfigs.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.targets.staticConfig.relabelingConfigs.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.targets.staticConfig.relabelingConfigs.targetLabel
Label 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.static
The list of hosts to probe.
- objectspec.tlsConfig
TLS configuration to use when scraping the endpoint.
- objectspec.tlsConfig.ca
Certificate authority used when verifying server certificates.
- objectspec.tlsConfig.ca.configMap
ConfigMap containing data to use for the targets.
- stringspec.tlsConfig.ca.configMap.key
Required value
The key to select.
- stringspec.tlsConfig.ca.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.ca.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.tlsConfig.ca.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.ca.secret.optional
Specify whether the Secret or its key must be defined
- objectspec.tlsConfig.cert
Client certificate to present when doing client-authentication.
- objectspec.tlsConfig.cert.configMap
ConfigMap containing data to use for the targets.
- stringspec.tlsConfig.cert.configMap.key
Required value
The key to select.
- stringspec.tlsConfig.cert.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.cert.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.tlsConfig.cert.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.cert.secret.optional
Specify whether the Secret or its key must be defined
- booleanspec.tlsConfig.insecureSkipVerify
Disable target certificate validation.
- objectspec.tlsConfig.keySecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.keySecret.optional
Specify whether the Secret or its key must be defined
- stringspec.tlsConfig.serverName
Used to verify the hostname for the targets.
ScrapeConfig
Scope: Namespaced
Version: v1alpha1
ScrapeConfig defines a namespaced Prometheus scrape_config to be aggregated across multiple namespaces into the Prometheus configuration.
- stringapiVersion
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
- stringkind
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
- objectmetadata
- objectspec
Required value
ScrapeConfigSpec is a specification of the desired configuration for a scrape configuration.
- object
Authorization header to use on every scrape request.
- object
Selects a key of a Secret in the namespace that contains the credentials for authentication.
- string
Required value
The key of the secret to select from. Must be a valid secret key.
- string
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- boolean
Specify whether the Secret or its key must be defined
- string
Defines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
- objectspec.basicAuth
BasicAuth information to use on every scrape request.
- objectspec.basicAuth.password
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.basicAuth.password.optional
Specify whether the Secret or its key must be defined
- objectspec.basicAuth.username
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.basicAuth.username.optional
Specify whether the Secret or its key must be defined
- array of objectsspec.consulSDConfigs
ConsulSDConfigs defines a list of Consul service discovery configurations.
ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
- booleanspec.consulSDConfigs.allow_stale
Allow stale Consul results (see https://www.consul.io/api/features/consistency.html). Will reduce load on Consul. If unset, Prometheus uses its default value.
- object
Authorization header configuration to authenticate against the Consul Server.
- object
Selects a key of a Secret in the namespace that contains the credentials for authentication.
- string
Required value
The key of the secret to select from. Must be a valid secret key.
- string
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- boolean
Specify whether the Secret or its key must be defined
- string
Defines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
- objectspec.consulSDConfigs.basicAuth
BasicAuth information to authenticate against the Consul Server. More info: https://prometheus.io/docs/operating/configuration/#endpoints
- objectspec.consulSDConfigs.basicAuth.password
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.basicAuth.password.optional
Specify whether the Secret or its key must be defined
- objectspec.consulSDConfigs.basicAuth.username
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.basicAuth.username.optional
Specify whether the Secret or its key must be defined
- stringspec.consulSDConfigs.datacenter
Consul Datacenter name, if not provided it will use the local Consul Agent Datacenter.
- booleanspec.consulSDConfigs.enable_http2
Whether to enable HTTP2. If unset, Prometheus uses its default value.
- booleanspec.consulSDConfigs.follow_redirects
Configure whether HTTP requests follow HTTP 3xx redirects. If unset, Prometheus uses its default value.
- stringspec.consulSDConfigs.namespace
Namespaces are only supported in Consul Enterprise.
- stringspec.consulSDConfigs.no_proxy
Comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying. IP and domain names can contain port numbers.
- objectspec.consulSDConfigs.node_meta
Node metadata key/value pairs to filter nodes for a given service.
- objectspec.consulSDConfigs.oauth2
Optional OAuth 2.0 configuration.
- objectspec.consulSDConfigs.oauth2.clientId
Required value
The secret or configmap containing the OAuth2 client id
- objectspec.consulSDConfigs.oauth2.clientId.configMap
ConfigMap containing data to use for the targets.
- stringspec.consulSDConfigs.oauth2.clientId.configMap.key
Required value
The key to select.
- stringspec.consulSDConfigs.oauth2.clientId.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.oauth2.clientId.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.consulSDConfigs.oauth2.clientId.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.oauth2.clientId.secret.optional
Specify 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.oauth2.clientSecret.optional
Specify whether the Secret or its key must be defined
- objectspec.consulSDConfigs.oauth2.endpointParams
Parameters to append to the token URL
- array of stringsspec.consulSDConfigs.oauth2.scopes
OAuth2 scopes used for the token request
- stringspec.consulSDConfigs.oauth2.tokenUrl
Required value
The URL to fetch the token from
- stringspec.consulSDConfigs.partition
Admin Partitions are only supported in Consul Enterprise.
- objectspec.consulSDConfigs.proxy_connect_header
Specifies headers to send to proxies during CONNECT requests.
- booleanspec.consulSDConfigs.proxy_from_environment
Use 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_url
Optional proxy URL.
- stringspec.consulSDConfigs.refresh_interval
The 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.scheme
HTTP Scheme default “http”
Allowed values:
HTTP,HTTPS - stringspec.consulSDConfigs.server
Required value
A valid string consisting of a hostname or IP followed by an optional port number.
- array of stringsspec.consulSDConfigs.services
A list of services for which targets are retrieved. If omitted, all services are scraped.
- stringspec.consulSDConfigs.tag_separator
The string by which Consul tags are joined into the tag label. If unset, Prometheus uses its default value.
- array of strings
An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list.
- objectspec.consulSDConfigs.tlsConfig
TLS Config
- objectspec.consulSDConfigs.tlsConfig.ca
Certificate authority used when verifying server certificates.
- objectspec.consulSDConfigs.tlsConfig.ca.configMap
ConfigMap containing data to use for the targets.
- stringspec.consulSDConfigs.tlsConfig.ca.configMap.key
Required value
The key to select.
- stringspec.consulSDConfigs.tlsConfig.ca.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.tlsConfig.ca.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.consulSDConfigs.tlsConfig.ca.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.tlsConfig.ca.secret.optional
Specify whether the Secret or its key must be defined
- objectspec.consulSDConfigs.tlsConfig.cert
Client certificate to present when doing client-authentication.
- objectspec.consulSDConfigs.tlsConfig.cert.configMap
ConfigMap containing data to use for the targets.
- stringspec.consulSDConfigs.tlsConfig.cert.configMap.key
Required value
The key to select.
- stringspec.consulSDConfigs.tlsConfig.cert.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.tlsConfig.cert.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.consulSDConfigs.tlsConfig.cert.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.tlsConfig.cert.secret.optional
Specify whether the Secret or its key must be defined
- booleanspec.consulSDConfigs.tlsConfig.insecureSkipVerify
Disable target certificate validation.
- objectspec.consulSDConfigs.tlsConfig.keySecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.tlsConfig.keySecret.optional
Specify whether the Secret or its key must be defined
- stringspec.consulSDConfigs.tlsConfig.serverName
Used to verify the hostname for the targets.
- objectspec.consulSDConfigs.tokenRef
Consul 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.consulSDConfigs.tokenRef.optional
Specify whether the Secret or its key must be defined
- array of objectsspec.dnsSDConfigs
DNSSDConfigs defines a list of DNS service discovery configurations.
DNSSDConfig allows specifying a set of DNS domain names which are periodically queried to discover a list of targets. The DNS servers to be contacted are read from /etc/resolv.conf. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config
- array of stringsspec.dnsSDConfigs.names
Required value
A list of DNS domain names to be queried.
- integerspec.dnsSDConfigs.port
The port number used if the query type is not SRV Ignored for SRV records
- stringspec.dnsSDConfigs.refreshInterval
RefreshInterval 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.type
The 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.fileSDConfigs
FileSDConfigs defines a list of file service discovery configurations.
FileSDConfig defines a Prometheus file service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config
- array of stringsspec.fileSDConfigs.files
Required value
List 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.
- stringElement of the array
SDFile represents a file used for service discovery
Pattern:
^[^*]*(\*[^/]*)?\.(json|yml|yaml|JSON|YML|YAML)$
- stringspec.fileSDConfigs.refreshInterval
RefreshInterval 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.honorLabels
HonorLabels chooses the metric’s labels on collisions with target labels.
- booleanspec.honorTimestamps
HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
- array of objectsspec.httpSDConfigs
HTTPSDConfigs defines a list of HTTP service discovery configurations.
HTTPSDConfig defines a prometheus HTTP service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config
- object
Authorization header configuration to authenticate against the target HTTP endpoint.
- object
Selects a key of a Secret in the namespace that contains the credentials for authentication.
- string
Required value
The key of the secret to select from. Must be a valid secret key.
- string
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- boolean
Specify whether the Secret or its key must be defined
- string
Defines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
- objectspec.httpSDConfigs.basicAuth
BasicAuth information to authenticate against the target HTTP endpoint. More info: https://prometheus.io/docs/operating/configuration/#endpoints
- objectspec.httpSDConfigs.basicAuth.password
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.httpSDConfigs.basicAuth.password.optional
Specify whether the Secret or its key must be defined
- objectspec.httpSDConfigs.basicAuth.username
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.httpSDConfigs.basicAuth.username.optional
Specify whether the Secret or its key must be defined
- stringspec.httpSDConfigs.refreshInterval
RefreshInterval 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.tlsConfig
TLS configuration applying to the target HTTP endpoint.
- objectspec.httpSDConfigs.tlsConfig.ca
Certificate authority used when verifying server certificates.
- objectspec.httpSDConfigs.tlsConfig.ca.configMap
ConfigMap containing data to use for the targets.
- stringspec.httpSDConfigs.tlsConfig.ca.configMap.key
Required value
The key to select.
- stringspec.httpSDConfigs.tlsConfig.ca.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.httpSDConfigs.tlsConfig.ca.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.httpSDConfigs.tlsConfig.ca.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.httpSDConfigs.tlsConfig.ca.secret.optional
Specify whether the Secret or its key must be defined
- objectspec.httpSDConfigs.tlsConfig.cert
Client certificate to present when doing client-authentication.
- objectspec.httpSDConfigs.tlsConfig.cert.configMap
ConfigMap containing data to use for the targets.
- stringspec.httpSDConfigs.tlsConfig.cert.configMap.key
Required value
The key to select.
- stringspec.httpSDConfigs.tlsConfig.cert.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.httpSDConfigs.tlsConfig.cert.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.httpSDConfigs.tlsConfig.cert.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.httpSDConfigs.tlsConfig.cert.secret.optional
Specify whether the Secret or its key must be defined
- booleanspec.httpSDConfigs.tlsConfig.insecureSkipVerify
Disable target certificate validation.
- objectspec.httpSDConfigs.tlsConfig.keySecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.httpSDConfigs.tlsConfig.keySecret.optional
Specify whether the Secret or its key must be defined
- stringspec.httpSDConfigs.tlsConfig.serverName
Used to verify the hostname for the targets.
- stringspec.httpSDConfigs.url
Required value
URL from which the targets are fetched.
Pattern:
^http(s)?://.+$
- integerspec.keepDroppedTargets
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.
- array of objectsspec.kubernetesSDConfigs
KubernetesSDConfigs defines a list of Kubernetes service discovery configurations.
KubernetesSDConfig allows retrieving scrape targets from Kubernetes’ REST API. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config
- stringspec.kubernetesSDConfigs.role
Required value
Role of the Kubernetes entities that should be discovered. Currently the only supported role is “Node”.
Allowed values:
Node
- integerspec.labelLimit
Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
- integerspec.labelNameLengthLimit
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.
- integerspec.labelValueLengthLimit
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.
- array of objectsspec.metricRelabelings
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
- stringspec.metricRelabelings.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.metricRelabelings.regex
Regular expression against which the extracted value is matched.
- stringspec.metricRelabelings.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.metricRelabelings.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.metricRelabelings.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.metricRelabelings.targetLabel
Label 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.metricsPath
MetricsPath HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g. /metrics).
- objectspec.params
Optional HTTP URL parameters
- array of objectsspec.relabelings
RelabelConfigs 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_configRelabelConfig 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
- stringspec.relabelings.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.relabelings.regex
Regular expression against which the extracted value is matched.
- stringspec.relabelings.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.relabelings.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.relabelings.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.relabelings.targetLabel
Label 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.sampleLimit
SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
- stringspec.scheme
Configures the protocol scheme used for requests. If empty, Prometheus uses HTTP by default.
Allowed values:
HTTP,HTTPS - stringspec.scrapeInterval
ScrapeInterval 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.scrapeTimeout
ScrapeTimeout 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.staticConfigs
StaticConfigs defines a list of static targets with a common label set.
StaticConfig defines a Prometheus static configuration. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
- objectspec.staticConfigs.labels
Labels assigned to all metrics scraped from the targets.
- array of stringsspec.staticConfigs.targets
List of targets for this static configuration.
- stringElement of the array
Target represents a target for Prometheus to scrape
- integerspec.targetLimit
TargetLimit defines a limit on the number of scraped targets that will be accepted.
- objectspec.tlsConfig
TLS configuration to use on every scrape request
- objectspec.tlsConfig.ca
Certificate authority used when verifying server certificates.
- objectspec.tlsConfig.ca.configMap
ConfigMap containing data to use for the targets.
- stringspec.tlsConfig.ca.configMap.key
Required value
The key to select.
- stringspec.tlsConfig.ca.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.ca.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.tlsConfig.ca.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.ca.secret.optional
Specify whether the Secret or its key must be defined
- objectspec.tlsConfig.cert
Client certificate to present when doing client-authentication.
- objectspec.tlsConfig.cert.configMap
ConfigMap containing data to use for the targets.
- stringspec.tlsConfig.cert.configMap.key
Required value
The key to select.
- stringspec.tlsConfig.cert.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.cert.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.tlsConfig.cert.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.cert.secret.optional
Specify whether the Secret or its key must be defined
- booleanspec.tlsConfig.insecureSkipVerify
Disable target certificate validation.
- objectspec.tlsConfig.keySecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.tlsConfig.keySecret.optional
Specify whether the Secret or its key must be defined
- stringspec.tlsConfig.serverName
Used to verify the hostname for the targets.
ServiceMonitor
Scope: Namespaced
Version: v1
ServiceMonitor defines monitoring for a set of services.
- stringapiVersion
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
- stringkind
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
- objectmetadata
- objectspec
Required value
Specification of desired Service selection for target discovery by Prometheus.
- objectspec.attachMetadata
Attaches node metadata to discovered targets. Requires Prometheus v2.37.0 and above.
- booleanspec.attachMetadata.node
When 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.
Endpoint defines a scrapeable endpoint serving Prometheus metrics.
- object
Authorization section for this endpoint
- object
Selects a key of a Secret in the namespace that contains the credentials for authentication.
- string
Required value
The key of the secret to select from. Must be a valid secret key.
- string
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- boolean
Specify whether the Secret or its key must be defined
- string
Defines the authentication type. The value is case-insensitive. “Basic” is not a supported value. Default: “Bearer”
- objectspec.endpoints.basicAuth
BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints
- objectspec.endpoints.basicAuth.password
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.basicAuth.password.optional
Specify whether the Secret or its key must be defined
- objectspec.endpoints.basicAuth.username
The 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.basicAuth.username.optional
Specify whether the Secret or its key must be defined
- stringspec.endpoints.bearerTokenFile
File to read bearer token for scraping targets.
- objectspec.endpoints.bearerTokenSecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.bearerTokenSecret.optional
Specify whether the Secret or its key must be defined
- booleanspec.endpoints.enableHttp2
Whether to enable HTTP2.
- booleanspec.endpoints.filterRunning
Drop 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.followRedirects
FollowRedirects configures whether scrape requests follow HTTP 3xx redirects.
- booleanspec.endpoints.honorLabels
HonorLabels chooses the metric’s labels on collisions with target labels.
- booleanspec.endpoints.honorTimestamps
HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
- stringspec.endpoints.interval
Interval 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.metricRelabelings
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
- stringspec.endpoints.metricRelabelings.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.endpoints.metricRelabelings.regex
Regular expression against which the extracted value is matched.
- stringspec.endpoints.metricRelabelings.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.endpoints.metricRelabelings.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.endpoints.metricRelabelings.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.endpoints.metricRelabelings.targetLabel
Label 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.oauth2
OAuth2 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.configMap
ConfigMap containing data to use for the targets.
- stringspec.endpoints.oauth2.clientId.configMap.key
Required value
The key to select.
- stringspec.endpoints.oauth2.clientId.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.oauth2.clientId.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.endpoints.oauth2.clientId.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.oauth2.clientId.secret.optional
Specify 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.oauth2.clientSecret.optional
Specify whether the Secret or its key must be defined
- objectspec.endpoints.oauth2.endpointParams
Parameters to append to the token URL
- array of stringsspec.endpoints.oauth2.scopes
OAuth2 scopes used for the token request
- stringspec.endpoints.oauth2.tokenUrl
Required value
The URL to fetch the token from
- objectspec.endpoints.params
Optional HTTP URL parameters
- stringspec.endpoints.path
HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g.
/metrics). - stringspec.endpoints.port
Name of the service port this endpoint refers to. Mutually exclusive with targetPort.
- stringspec.endpoints.proxyUrl
ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
- array of objectsspec.endpoints.relabelings
RelabelConfigs 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_configRelabelConfig 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
- stringspec.endpoints.relabelings.action
Action 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.modulus
Modulus to take of the hash of the source label values. Only applicable when the action is
HashMod. - stringspec.endpoints.relabelings.regex
Regular expression against which the extracted value is matched.
- stringspec.endpoints.relabelings.replacement
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
- stringspec.endpoints.relabelings.separator
Separator is the string between concatenated SourceLabels.
- array of stringsspec.endpoints.relabelings.sourceLabels
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
- stringElement of the array
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_]*$
- stringspec.endpoints.relabelings.targetLabel
Label 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.scheme
HTTP 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.scrapeTimeout
Timeout 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.targetPort
Name 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.tlsConfig
TLS configuration to use when scraping the endpoint
- objectspec.endpoints.tlsConfig.ca
Certificate authority used when verifying server certificates.
- objectspec.endpoints.tlsConfig.ca.configMap
ConfigMap containing data to use for the targets.
- stringspec.endpoints.tlsConfig.ca.configMap.key
Required value
The key to select.
- stringspec.endpoints.tlsConfig.ca.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.tlsConfig.ca.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.endpoints.tlsConfig.ca.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.tlsConfig.ca.secret.optional
Specify whether the Secret or its key must be defined
- stringspec.endpoints.tlsConfig.caFile
Path to the CA cert in the Prometheus container to use for the targets.
- objectspec.endpoints.tlsConfig.cert
Client certificate to present when doing client-authentication.
- objectspec.endpoints.tlsConfig.cert.configMap
ConfigMap containing data to use for the targets.
- stringspec.endpoints.tlsConfig.cert.configMap.key
Required value
The key to select.
- stringspec.endpoints.tlsConfig.cert.configMap.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.tlsConfig.cert.configMap.optional
Specify whether the ConfigMap or its key must be defined
- objectspec.endpoints.tlsConfig.cert.secret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.tlsConfig.cert.secret.optional
Specify whether the Secret or its key must be defined
- stringspec.endpoints.tlsConfig.certFile
Path to the client cert file in the Prometheus container for the targets.
- booleanspec.endpoints.tlsConfig.insecureSkipVerify
Disable target certificate validation.
- stringspec.endpoints.tlsConfig.keyFile
Path to the client key file in the Prometheus container for the targets.
- objectspec.endpoints.tlsConfig.keySecret
Secret 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.name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- booleanspec.endpoints.tlsConfig.keySecret.optional
Specify whether the Secret or its key must be defined
- stringspec.endpoints.tlsConfig.serverName
Used to verify the hostname for the targets.
- stringspec.jobLabel
JobLabel 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.keepDroppedTargets
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.
- integerspec.labelLimit
Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
- integerspec.labelNameLengthLimit
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.
- integerspec.labelValueLengthLimit
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.
- objectspec.namespaceSelector
Selector to select which namespaces the Kubernetes Endpoints objects are discovered from.
- booleanspec.namespaceSelector.any
Boolean describing whether all namespaces are selected in contrast to a list restricting them.
- array of stringsspec.namespaceSelector.matchNames
List of namespace names to select from.
- array of stringsspec.podTargetLabels
PodTargetLabels transfers labels on the Kubernetes
Podonto the created metrics. - integerspec.sampleLimit
SampleLimit 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.matchExpressions
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.
- stringspec.selector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringspec.selector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringsspec.selector.matchExpressions.values
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.
- objectspec.selector.matchLabels
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.
- array of stringsspec.targetLabels
TargetLabels transfers labels from the Kubernetes
Serviceonto the created metrics. - integerspec.targetLimit
TargetLimit defines a limit on the number of scraped targets that will be accepted.