VictoriaMetrics/docs/operator/resources/vmscrapeconfig.md
Github Actions c57e68a0cd
Automatic update operator docs from VictoriaMetrics/operator@64879fb ()
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: f41gh7 <nik@victoriametrics.com>
(cherry picked from commit 015f0b0424)
2024-08-19 17:45:40 +02:00

1.4 KiB

weight title menu aliases
11 VMScrapeConfig
docs
identifier parent weight
operator-cr-vmscrapeconfig operator-cr 11
/operator/resources/vmscrapeconfig/
/operator/resources/vmscrapeconfig/index.html

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