alerts: make alerting rule RPCErrors compatible with PromQL (#1204)

Original query can't be executed via PromQL which results in error
if expression is evaluated by Prometheus. The new expression is
compatible with both engines.
This commit is contained in:
Roman Khavronenko 2021-04-13 06:10:23 +01:00 committed by GitHub
parent c872ba45b9
commit c6fc3fa94d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,16 @@ groups:
Please verify if clients are sending correct requests."
- alert: RPCErrors
expr: sum(increase({__name__=~"vm_rpc_.*_errors_total"}[5m])) by(job, instance) > 0
expr: |
(
sum(increase(vm_rpc_connection_errors_total[5m])) by(job, instance)
+
sum(increase(vm_rpc_dial_errors_total[5m])) by(job, instance)
+
sum(increase(vm_rpc_handshake_errors_total[5m])) by(job, instance)
+
sum(increase(vm_rpc_reroute_errors_total[5m])) by(job, instance)
) > 0
for: 15m
labels:
severity: warning