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

10 lines
352 B
YAML
Raw Normal View History

2022-04-28 10:34:23 +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