mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-18 22:52:11 +01:00
4859f5eeed
(cherry picked from commit cba2f6dce1
)
1.3 KiB
1.3 KiB
sort | weight | title | menu | aliases | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
15 | 15 | VMServiceScrape |
|
|
VMScrapeConfig
The VMScrapeConfig
CRD allows to define a scrape config using any of the service discovery options supported in victoriametrics.
VMScrapeConfig
object generates part of VMAgent configuration with Prometheus-compatible scrape targets.
Specification
You can see the full actual specification of the VMScrapeConfig
resource in
the API docs -> VMScrapeConfig.
Also, you can check out the examples section.
Migration from Prometheus
The VMScrapeConfig
CRD from VictoriaMetrics Operator is a drop-in replacement
for the Prometheus ScrapeConfig
from prometheus-operator.
More details about migration from prometheus-operator you can read in this doc.
Examples
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMScrapeConfig
metadata:
name: mongodb
spec:
consulSDConfigs:
- server: https://consul-dns:8500
services:
- mongodb
relabelConfigs:
- action: replace
sourceLabels:
- __meta_consul_service
targetLabel: job