2023-10-02 14:50:08 +02:00
---
weight: 6
title: Monitoring
2023-10-05 12:43:28 +02:00
menu:
docs:
parent: "operator"
weight: 6
2023-11-22 12:59:07 +01:00
aliases:
2024-08-16 16:32:25 +02:00
- /operator/monitoring
- /operator/monitoring/index.html
2023-10-02 14:50:08 +02:00
---
VictoriaMetrics operator exports internal metrics in Prometheus exposition format at `/metrics` page.
2024-08-16 16:32:25 +02:00
These metrics can be scraped via [vmagent ](https://docs.victoriametrics.com/operator/resources/vmagent ) or Prometheus.
2023-10-02 14:50:08 +02:00
## Dashboard
2024-01-23 16:22:16 +01:00
Official Grafana dashboard available for [vmoperator ](https://grafana.com/grafana/dashboards/17869-victoriametrics-operator/ ).
2023-10-02 14:50:08 +02:00
2024-08-16 16:32:25 +02:00
![operator dashboard monitoring ](monitoring_operator-dashboard.webp )
2023-10-02 14:50:08 +02:00
Graphs on the dashboards contain useful hints - hover the `i` icon in the top left corner of each graph to read it.
2024-01-23 16:22:16 +01:00
## Alerting rules
Alerting rules for VictoriaMetrics operator are available [here ](https://github.com/VictoriaMetrics/operator/blob/master/config/alerting/vmoperator-rules.yaml ).
2023-10-02 14:50:08 +02:00
## Configuration
### Helm-chart victoria-metrics-k8s-stack
In [victoria-metrics-k8s-stack ](https://github.com/VictoriaMetrics/helm-charts/blob/master/charts/victoria-metrics-k8s-stack/README.md ) helm-chart operator self-scrapes metrics by default.
2024-01-23 16:22:16 +01:00
This helm-chart also includes [official grafana dashboard for operator ](#dashboard ) and [official alerting rules for operator ](#alerting-rules ).
2023-10-02 14:50:08 +02:00
### Helm-chart victoria-metrics-operator
With [victoria-metrics-operator ](https://github.com/VictoriaMetrics/helm-charts/tree/master/charts/victoria-metrics-operator/README.md ) you can use following parameter in `values.yaml` :
```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.
2024-08-16 16:32:25 +02:00
You will also need to deploy a (vmsingle)[https://docs.victoriametrics.com/operator/resources/vmsingle] where the metrics will be collected.
2023-10-02 14:50:08 +02:00
### Pure operator installation
With pure operator installation you can use config with separate vmsingle and scrape object for operator like that:
```yaml
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
```
2024-08-16 16:32:25 +02:00
See more info about object [VMServiceScrape ](https://docs.victoriametrics.com/operator/resources/vmservicescrape ).
2023-10-02 14:50:08 +02:00
2024-08-16 16:32:25 +02:00
You will also need a [vmsingle ](https://docs.victoriametrics.com/operator/resources/vmsingle ) where the metrics will be collected.
2023-10-02 14:50:08 +02:00