mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
docs: update vmalert and vmagent docs (#6207)
* restore and actualize doc section explaining duplicated labels error * rm misleading comment about post-aggregation in stream aggregation
This commit is contained in:
parent
8bca4d2de4
commit
e3c226cf92
@ -32,7 +32,7 @@ type Rule interface {
|
||||
close()
|
||||
}
|
||||
|
||||
var errDuplicate = errors.New("result contains metrics with the same labelset after applying rule labels. See https://docs.victoriametrics.com/vmalert/#series-with-the-same-labelset for details")
|
||||
var errDuplicate = errors.New("result contains metrics with the same labelset during evaluation. See https://docs.victoriametrics.com/vmalert/#series-with-the-same-labelset for details")
|
||||
|
||||
type ruleState struct {
|
||||
sync.RWMutex
|
||||
|
@ -598,9 +598,6 @@ some_counter:5m_increase / 5m
|
||||
|
||||
This is similar to `rate(some_counter[5m])`.
|
||||
|
||||
Please note, opposite to [rate](https://docs.victoriametrics.com/metricsql/#rate), `increase` aggregations can be
|
||||
combined safely afterwards. This is helpful when the aggregation is calculated by more than one vmagent.
|
||||
|
||||
Aggregating irregular and sporadic metrics (received from [Lambdas](https://aws.amazon.com/lambda/)
|
||||
or [Cloud Functions](https://cloud.google.com/functions)) can be controlled via [staleness_interval](#staleness) option.
|
||||
|
||||
|
@ -902,6 +902,25 @@ max(vmalert_alerting_rules_last_evaluation_series_fetched) by(group, alertname)
|
||||
See more details [here](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4039).
|
||||
This feature is available only if vmalert is using VictoriaMetrics v1.90 or higher as a datasource.
|
||||
|
||||
### Series with the same labelset
|
||||
|
||||
vmalert can produce the following error message:
|
||||
```
|
||||
result contains metrics with the same labelset during evaluation
|
||||
```
|
||||
|
||||
The error means there is a collision between [time series](https://docs.victoriametrics.com/keyConcepts.html#time-series)
|
||||
during evaluation.
|
||||
|
||||
For example, a rule with `expr: {__name__=~"vmalert_alerts_.*"} > 0` returns two distinct time series in response:
|
||||
```
|
||||
{__name__="vmalert_alerts_pending",job="vmalert",alertname="HostContextSwitching"} 12
|
||||
{__name__="vmalert_alerts_firing",job="vmalert",alertname="HostContextSwitching"} 0
|
||||
```
|
||||
|
||||
As label `__name__` will be dropped during evaluation, leads to duplicated time series.
|
||||
To fix this, one could use function like [label_replace](https://docs.victoriametrics.com/metricsql/#label_replace) to preserve the distinct labelset.
|
||||
|
||||
## mTLS protection
|
||||
|
||||
By default `vmalert` accepts http requests at `8880` port (this port can be changed via `-httpListenAddr` command-line flags),
|
||||
|
Loading…
Reference in New Issue
Block a user