VictoriaMetrics/docs/operator/resources/vmnodescrape.md
Github Actions c57e68a0cd
Automatic update operator docs from VictoriaMetrics/operator@64879fb (#6831)
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.9 KiB

weight title menu aliases
7 VMNodeScrape
docs
identifier parent weight
operator-cr-vmnodescrape operator-cr 7
/operator/resources/vmnodescrape/
/operator/resources/vmnodescrape/index.html

The VMNodeScrape CRD provides discovery mechanism for scraping metrics kubernetes nodes, it is useful for node exporters monitoring.

VMNodeScrape object generates part of VMAgent configuration. 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 cadvisor scraping, node-exporter or other node-based exporters. VMAgent nodeScrapeSelector must match VMNodeScrape labels.

More information about selectors you can find in this doc.

Specification

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

Also, you can check out the examples section.

Examples

Cadvisor scraping

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMNodeScrape
metadata:
  name: cadvisor-metrics
spec:
  scheme: "https"
  tlsConfig:
    insecureSkipVerify: true
    caFile: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
  bearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token"
  relabelConfigs:
    - action: labelmap
      regex: __meta_kubernetes_node_label_(.+)
    - targetLabel: __address__
      replacement: kubernetes.default.svc:443
    - sourceLabels: [__meta_kubernetes_node_name]
      regex: (.+)
      targetLabel: __metrics_path__
      replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor