VictoriaMetrics/deployment/docker/rules/vlogs-example-alerts.yml
2024-11-18 14:28:16 +08:00

13 lines
518 B
YAML

groups:
- name: log-rules
type: vlogs
interval: 1m
rules:
- record: logCount
expr: '_time: 1m | stats by (path) count () as total'
annotations:
description: "path {{$labels.path}} generated {{$value}} logs in the last 1 minute"
- alert: tooManyLogs
expr: '_time: 1m | stats by (path) count () as total | filter total:>50'
annotations:
description: "path {{$labels.path}} generated more than 50 log entries in the last 1 minute: {{$value}}"