practica-loki-grafana/6-1-loki-alerts/rules.yml
Joan López de la Franca Beltran 118a09bcf2 Contents for lecture 6-1
2022-04-28 10:31:45 +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