VictoriaMetrics/docs/operator/resources/vmstaticscrape.md
Artem Navoiev 12b0e3e5cb
add hugo front matter for operator docs (#5122)
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-10-04 16:28:23 +02:00

1.4 KiB

sort weight title menu
13 13 VMStaticScrape
docs
parent weight
operator-custom-resources 13

VMStaticScrape

The VMStaticScrape CRD provides mechanism for scraping metrics from static targets, configured by CRD targets.

VMStaticScrape object generates part of VMAgent configuration with static "service discovery". It has various options for scraping configuration of target (with basic auth,tls access, by specific port name etc.).

By specifying configuration at CRD, operator generates config for VMAgent and syncs it. It's useful for external targets management, when service-discovery is not available. VMAgent staticScrapeSelector must match VMStaticScrape labels.

More information about selectors you can find in this doc.

Specification

You can see the full actual specification of the VMStaticScrape resource in the API docs -> VMStaticScrape.

Also, you can check out the examples section.

Examples

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMStaticScrape
metadata:
  name: vmstaticscrape-sample
spec:
  jobName: static
  targetEndpoints:
    - targets: ["192.168.0.1:9100", "196.168.0.50:9100"]
      labels:
        env: dev
        project: operator