attachMetadata
|
object
|
attachMetadata defines additional metadata which is added to the
discovered targets.
It requires Prometheus >= v2.37.0. |
bodySizeLimit
|
string
|
When defined, bodySizeLimit specifies a job level limit on the size
of uncompressed response body that will be accepted by Prometheus.
It requires Prometheus >= v2.28.0. |
endpoints
|
array
|
List of endpoints part of this ServiceMonitor.
Defines how to scrape metrics from Kubernetes [Endpoints](https://kubernetes.io/docs/concepts/services-networking/service/#endpoints) objects.
In most cases, an Endpoints object is backed by a Kubernetes [Service](https://kubernetes.io/docs/concepts/services-networking/service/) object with the same name and labels. |
endpoints[]
|
object
|
Endpoint defines an endpoint serving Prometheus metrics to be scraped by
Prometheus. |
fallbackScrapeProtocol
|
string
|
The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.
It requires Prometheus >= v3.0.0. |
jobLabel
|
string
|
jobLabel selects the label from the associated Kubernetes Service
object which will be used as the job label for all metrics.
For example if jobLabel is set to foo and the Kubernetes Service
object is labeled with foo: bar , then Prometheus adds the job="bar"
label to all ingested metrics.
If the value of this field is empty or if the label doesn’t exist for
the given Service, the job label of the metrics defaults to the name
of the associated Kubernetes Service . |
keepDroppedTargets
|
integer
|
Per-scrape limit on the number of targets dropped by relabeling
that will be kept in memory. 0 means no limit.
It requires Prometheus >= v2.47.0. |
labelLimit
|
integer
|
Per-scrape limit on number of labels that will be accepted for a sample.
It requires Prometheus >= v2.27.0. |
labelNameLengthLimit
|
integer
|
Per-scrape limit on length of labels name that will be accepted for a sample.
It requires Prometheus >= v2.27.0. |
labelValueLengthLimit
|
integer
|
Per-scrape limit on length of labels value that will be accepted for a sample.
It requires Prometheus >= v2.27.0. |
namespaceSelector
|
object
|
namespaceSelector defines in which namespace(s) Prometheus should discover the services.
By default, the services are discovered in the same namespace as the ServiceMonitor object but it is possible to select pods across different/all namespaces.
|
nativeHistogramBucketLimit
|
integer
|
If there are more than this many buckets in a native histogram,
buckets will be merged to stay within the limit.
It requires Prometheus >= v2.45.0. |
nativeHistogramMinBucketFactor
|
integer-or-string
|
If the growth factor of one bucket to the next is smaller than this,
buckets will be merged to increase the factor sufficiently.
It requires Prometheus >= v2.50.0. |
podTargetLabels
|
array (string)
|
podTargetLabels defines the labels which are transferred from the
associated Kubernetes Pod object onto the ingested metrics.
|
sampleLimit
|
integer
|
sampleLimit defines a per-scrape limit on the number of scraped samples
that will be accepted.
|
scrapeClass
|
string
|
The scrape class to apply. |
scrapeClassicHistograms
|
boolean
|
Whether to scrape a classic histogram that is also exposed as a native histogram.
It requires Prometheus >= v2.45.0. |
scrapeProtocols
|
array (string)
|
scrapeProtocols defines the protocols to negotiate during a scrape. It tells clients the
protocols supported by Prometheus in order of preference (from most to least preferred).
If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0. |
selector
|
object
|
Label selector to select the Kubernetes Endpoints objects to scrape metrics from. |
selectorMechanism
|
string
|
Mechanism used to select the endpoints to scrape.
By default, the selection process relies on relabel configurations to filter the discovered targets.
Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters.
Which strategy is best for your use case needs to be carefully evaluated.
It requires Prometheus >= v2.17.0. |
targetLabels
|
array (string)
|
targetLabels defines the labels which are transferred from the
associated Kubernetes Service object onto the ingested metrics.
|
targetLimit
|
integer
|
targetLimit defines a limit on the number of scraped targets that will
be accepted.
|