VictoriaMetrics/docs/operator/monitoring.md
Aliaksandr Valialkin 3230525c36
docs: use persistent links to Grafana dashboards
These links do not depend on the dashboard name, so they do not break after the renaming of the dashboard.

This is a follow-up for ff33e60a3d
2024-01-22 01:45:42 +02:00

2.3 KiB

sort weight title menu aliases
6 6 Monitoring
docs
parent weight
operator 6
/operator/monitoring.html

Monitoring of VictoriaMetrics Operator

VictoriaMetrics operator exports internal metrics in Prometheus exposition format at /metrics page.

These metrics can be scraped via vmagent or Prometheus.

Dashboard

Official Grafana dashboard for vmoperator is available here.

Graphs on the dashboards contain useful hints - hover the i icon in the top left corner of each graph to read it.

Configuration

Helm-chart victoria-metrics-k8s-stack

In victoria-metrics-k8s-stack helm-chart operator self-scrapes metrics by default.

This helm-chart also includes official grafana dashboard for operator.

Helm-chart victoria-metrics-operator

With victoria-metrics-operator you can use following parameter in values.yaml:

# values.yaml
#...
# -- configures monitoring with serviceScrape. VMServiceScrape must be pre-installed
serviceMonitor:
  enabled: true

This parameter makes helm-chart to create a scrape-object for installed operator instance.

You will also need to deploy a (vmsingle)[./resources/vmsingle.md] where the metrics will be collected.

Pure operator installation

With pure operator installation you can use config with separate vmsingle and scrape object for operator like that:

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
  name: vmoperator
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: vm-operator
      app.kubernetes.io/name: victoria-metrics-operator
  endpoints:
    - port: http
  namespaceSelector:
    matchNames:
      - monitoring

See more info about object VMServiceScrape.

You will also need a vmsingle where the metrics will be collected.