service/sshd: add loki alert rule

This commit is contained in:
Felix Buehler 2023-05-21 20:23:20 +02:00
parent bc8db6f2e9
commit 25a5af1d24
2 changed files with 8 additions and 1 deletions

View file

@ -25,5 +25,12 @@ in
# by setting an hashed password in the `users.users.felix` block as `initialHashedPassword`.
# additionally needed by deploy-rs
security.sudo.wheelNeedsPassword = false;
my.services.loki.rules = {
sshd_closed = {
condition = ''count_over_time({unit="sshd.service"} |~ "Connection closed by authenticating user" [15m]) > 15'';
description = "More then 15 users have tried loggin in without success";
};
};
};
}