practica-loki-grafana/6-2-grafana-alerts/rules.yml
Joan López de la Franca Beltran b86e377b8a Contents for lecture 6-2
2022-04-28 10:34:23 +02:00

10 lines
352 B
YAML

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