ScrapeConfig defines a namespaced Prometheus scrape_config to be aggregated across multiple namespaces into the Prometheus configuration.
Last changed in Prometheus Operator v0.67.0
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
Kind 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
ScrapeConfigSpec is a specification of the desired configuration for a scrape configuration.
Authorization header to use on every scrape request.
Selects a key of a Secret in the namespace that contains the credentials for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Defines the authentication type. The value is case-insensitive. "Basic" is not a supported value. Default: "Bearer"
BasicAuth information to use on every scrape request.
The secret in the service monitor namespace that contains the password for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
The secret in the service monitor namespace that contains the username for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
ConsulSDConfigs defines a list of Consul service discovery configurations.
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.
Authorization header configuration to authenticate against the Consul Server.
Selects a key of a Secret in the namespace that contains the credentials for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Defines the authentication type. The value is case-insensitive. "Basic" is not a supported value. Default: "Bearer"
BasicAuth information to authenticate against the Consul Server. More info: https://prometheus.io/docs/operating/configuration/#endpoints
The secret in the service monitor namespace that contains the password for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
The secret in the service monitor namespace that contains the username for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Consul Datacenter name, if not provided it will use the local Consul Agent Datacenter.
Whether to enable HTTP2. If unset, Prometheus uses its default value.
Configure whether HTTP requests follow HTTP 3xx redirects. If unset, Prometheus uses its default value.
Namespaces are only supported in Consul Enterprise.
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.
Node metadata key/value pairs to filter nodes for a given service.
Optional OAuth 2.0 configuration.
The secret or configmap containing the OAuth2 client id
ConfigMap containing data to use for the targets.
The key to select.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the ConfigMap or its key must be defined
Secret containing data to use for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
The secret containing the OAuth2 client secret
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Parameters to append to the token URL
OAuth2 scopes used for the token request
The URL to fetch the token from
Admin Partitions are only supported in Consul Enterprise.
Specifies headers to send to proxies during CONNECT requests.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
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.
Optional proxy URL.
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.
HTTP Scheme default "http"
A valid string consisting of a hostname or IP followed by an optional port number.
A list of services for which targets are retrieved. If omitted, all services are scraped.
The string by which Consul tags are joined into the tag label. If unset, Prometheus uses its default value.
An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list.
TLS Config
Certificate authority used when verifying server certificates.
ConfigMap containing data to use for the targets.
The key to select.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the ConfigMap or its key must be defined
Secret containing data to use for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Client certificate to present when doing client-authentication.
ConfigMap containing data to use for the targets.
The key to select.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the ConfigMap or its key must be defined
Secret containing data to use for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Disable target certificate validation.
Secret containing the client key file for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Used to verify the hostname for the targets.
Consul ACL TokenRef, if not provided it will use the ACL from the local Consul Agent.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
FileSDConfigs defines a list of file service discovery configurations.
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.
RefreshInterval configures the refresh interval at which Prometheus will reload the content of the files.
HonorLabels chooses the metric's labels on collisions with target labels.
HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
HTTPSDConfigs defines a list of HTTP service discovery configurations.
Authorization header configuration to authenticate against the target HTTP endpoint.
Selects a key of a Secret in the namespace that contains the credentials for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Defines the authentication type. The value is case-insensitive. "Basic" is not a supported value. Default: "Bearer"
BasicAuth information to authenticate against the target HTTP endpoint. More info: https://prometheus.io/docs/operating/configuration/#endpoints
The secret in the service monitor namespace that contains the password for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
The secret in the service monitor namespace that contains the username for authentication.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
RefreshInterval configures the refresh interval at which Prometheus will re-query the endpoint to update the target list.
TLS configuration applying to the target HTTP endpoint.
Certificate authority used when verifying server certificates.
ConfigMap containing data to use for the targets.
The key to select.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the ConfigMap or its key must be defined
Secret containing data to use for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Client certificate to present when doing client-authentication.
ConfigMap containing data to use for the targets.
The key to select.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the ConfigMap or its key must be defined
Secret containing data to use for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Disable target certificate validation.
Secret containing the client key file for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Used to verify the hostname for the targets.
URL from which the targets are fetched.
KubernetesSDConfigs defines a list of Kubernetes service discovery configurations.
Role of the Kubernetes entities that should be discovered. Currently the only supported role is "Node".
Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
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.
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.
MetricsPath HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g. /metrics).
Optional HTTP URL parameters
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_name` label. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
Action to perform based on the regex matching. `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. Default: "Replace"
Modulus to take of the hash of the source label values. Only applicable when the action is `HashMod`.
Regular expression against which the extracted value is matched.
Replacement value against which a Replace action is performed if the regular expression matches. Regex capture groups are available.
Separator is the string between concatenated SourceLabels.
The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
Label to which the resulting string is written in a replacement. It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. Regex capture groups are available.
SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
Configures the protocol scheme used for requests. If empty, Prometheus uses HTTP by default.
ScrapeInterval is the interval between consecutive scrapes.
ScrapeTimeout is the number of seconds to wait until a scrape request times out.
StaticConfigs defines a list of static targets with a common label set.
Labels assigned to all metrics scraped from the targets.
List of targets for this static configuration.
TargetLimit defines a limit on the number of scraped targets that will be accepted.
TLS configuration to use on every scrape request
Certificate authority used when verifying server certificates.
ConfigMap containing data to use for the targets.
The key to select.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the ConfigMap or its key must be defined
Secret containing data to use for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Client certificate to present when doing client-authentication.
ConfigMap containing data to use for the targets.
The key to select.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the ConfigMap or its key must be defined
Secret containing data to use for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Disable target certificate validation.
Secret containing the client key file for the targets.
The key of the secret to select from. Must be a valid secret key.
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
Specify whether the Secret or its key must be defined
Used to verify the hostname for the targets.
Source: bundle.yaml
Changes to ScrapeConfig (monitoring.coreos.com/v1alpha1) in each Prometheus Operator version, compared to the version before it.
13 properties have been added
11 properties have changed the description
Released · View ScrapeConfig in v0.67.0
4 properties have been added
Released · View ScrapeConfig in v0.66.0
ScrapeConfig was first seen on this version of Prometheus Operator
Released · View ScrapeConfig in v0.65.0
No examples of ScrapeConfig yet. Contribute one on GitHub.