docs: supplement vmalert downsampling docs (#2765)

Co-authored-by: 吴典秋 <muti_kube@163.com>
This commit is contained in:
云原生驿站 2022-06-22 13:43:41 +08:00 committed by Aliaksandr Valialkin
parent dceca7e864
commit 67e5833ced
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
2 changed files with 24 additions and 0 deletions

View file

@ -417,6 +417,18 @@ or reducing resolution) and push results to "cold" cluster.
-remoteWrite.url=http://aggregated-cluster-vminsert:8480/insert/0/prometheus # vminsert addr to persist recording rules results
```
`vmalert` passes the configuration [recording rules](https://docs.victoriametrics.com/vmalert.html#recording-rules). These rules execute arbitrary MetricsQL expression and write the received result back to remote write destination.
For example, for `downsampling` of the total number of requests within five minutes, the configuration file can be as follows
```
groups:
- name: downsampling
rules:
- record: requests:avg5m
expr: avg_over_time(my_requests_total[5m])
```
<img alt="vmalert multi cluster" src="vmalert_multicluster.png">
Please note, [replay](#rules-backfilling) feature may be used for transforming historical data.

View file

@ -421,6 +421,18 @@ or reducing resolution) and push results to "cold" cluster.
-remoteWrite.url=http://aggregated-cluster-vminsert:8480/insert/0/prometheus # vminsert addr to persist recording rules results
```
`vmalert` passes the configuration [recording rules](https://docs.victoriametrics.com/vmalert.html#recording-rules). These rules execute arbitrary MetricsQL expression and write the received result back to remote write destination.
For example, for `downsampling` of the total number of requests within five minutes, the configuration file can be as follows
```
groups:
- name: downsampling
rules:
- record: requests:avg5m
expr: avg_over_time(my_requests_total[5m])
```
<img alt="vmalert multi cluster" src="vmalert_multicluster.png">
Please note, [replay](#rules-backfilling) feature may be used for transforming historical data.