authorization
|
object
|
authorization configures the Authorization header credentials to use when
scraping the target.
Cannot be set at the same time as basicAuth, or oauth2. |
basicAuth
|
object
|
basicAuth defines the Basic Authentication credentials to use when
scraping the target.
Cannot be set at the same time as authorization, or oauth2. |
bearerTokenFile
|
string
|
bearerTokenFile defines the file to read bearer token for scraping the target.
Deprecated: use authorization instead. |
bearerTokenSecret
|
object
|
bearerTokenSecret defines a key of a Secret containing the bearer
token for scraping targets. The secret needs to be in the same namespace
as the ServiceMonitor object and readable by the Prometheus Operator.
Deprecated: use authorization instead. |
enableHttp2
|
boolean
|
enableHttp2 can be used to disable HTTP2 when scraping the target. |
filterRunning
|
boolean
|
filterRunning when true, the pods which are not running (e.g. either in Failed or
Succeeded state) are dropped during the target discovery.
If unset, the filtering is enabled.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase |
followRedirects
|
boolean
|
followRedirects defines whether the scrape requests should follow HTTP
3xx redirects. |
honorLabels
|
boolean
|
honorLabels defines when true the metric’s labels when they collide
with the target’s labels. |
honorTimestamps
|
boolean
|
honorTimestamps defines whether Prometheus preserves the timestamps
when exposed by the target. |
interval
|
string
|
interval at which Prometheus scrapes the metrics from the target.
If empty, Prometheus uses the global scrape interval. |
metricRelabelings
|
array
|
metricRelabelings defines the relabeling rules to apply to the
samples before ingestion. |
metricRelabelings[]
|
object
|
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 |
noProxy
|
string
|
noProxy defines a 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.
It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0. |
oauth2
|
object
|
oauth2 defines the OAuth2 settings to use when scraping the target.
It requires Prometheus >= 2.27.0.
Cannot be set at the same time as authorization, or basicAuth. |
params
|
object
|
params define optional HTTP URL parameters. |
params{}
|
array (string)
|
|
path
|
string
|
path defines the HTTP path from which to scrape for metrics.
If empty, Prometheus uses the default value (e.g. /metrics). |
port
|
string
|
port defines the name of the Service port which this endpoint refers to.
It takes precedence over targetPort. |
proxyConnectHeader
|
object
|
proxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0. |
proxyConnectHeader{}
|
array
|
|
proxyConnectHeader{}[]
|
object
|
SecretKeySelector selects a key of a Secret. |
proxyFromEnvironment
|
boolean
|
proxyFromEnvironment defines whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).
It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0. |
proxyUrl
|
string
|
proxyUrl defines the HTTP proxy server to use. |
relabelings
|
array
|
relabelings defines the relabeling rules to apply the target’s
metadata labels.
The 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 |
relabelings[]
|
object
|
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 |
scheme
|
string
|
scheme defines the HTTP scheme to use for scraping.
http and https are the expected values unless you rewrite the
scheme label via relabeling.
If empty, Prometheus uses the default value http. |
scrapeTimeout
|
string
|
scrapeTimeout defines the timeout after which Prometheus considers the scrape to be failed.
If empty, Prometheus uses the global scrape timeout unless it is less
than the target’s scrape interval value in which the latter is used.
The value cannot be greater than the scrape interval otherwise the operator will reject the resource. |
targetPort
|
integer-or-string
|
targetPort defines the name or number of the target port of the Pod object behind the
Service. The port must be specified with the container’s port property. |
tlsConfig
|
object
|
tlsConfig defines the TLS configuration to use when scraping the target. |
trackTimestampsStaleness
|
boolean
|
trackTimestampsStaleness defines whether Prometheus tracks staleness of
the metrics that have an explicit timestamp present in scraped data.
Has no effect if honorTimestamps is false.
It requires Prometheus >= v2.48.0. |