mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
docs: supplement vmalert downsampling docs (#2765)
Co-authored-by: 吴典秋 <muti_kube@163.com>
This commit is contained in:
parent
dceca7e864
commit
67e5833ced
2 changed files with 24 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue