practica-loki-grafana/6-1-loki-alerts/rules.yml

10 lines
352 B
YAML
Raw Normal View History

2022-04-28 10:31:45 +02:00
groups:
- name: credentials_leak
rules:
- alert: http-credentials-leaked
annotations:
message: "{{ $labels.job }} is leaking http basic auth credentials."
expr: 'sum by (job) (count_over_time({job="myservice"} |~ "http(s?)://(\\w+):(\\w+)@" [5m]) > 0)'
for: 10s
labels:
severity: critical