Guides / Monitoring
Credential stuffing and API abuse show up as clusters of auth failures in a short window โ 50 failed login attempts in 5 minutes from the same IP is a very different signal than 1 per hour.
Smart Actions detects the cluster automatically.
// In your auth handler
export async function handleLogin(email: string, ip: string, success: boolean) {
if (!success) {
await logit.now("security", {
event: "Auth failure",
description: `Failed login for ${email}`,
icon: "๐",
notify: false,
tags: { ip, reason: "invalid_credentials" },
metadata: { email, ip, userAgent: req.headers.get("user-agent") },
});
}
}
| Field | Value |
|---|---|
| Name | Auth failure spike |
| Channel | security |
| Event name | Auth failure |
| Threshold | 20 |
| Window | 5 minutes |
| Cooldown | 15 minutes |
| Action | Push notification |
| Push title | ๐ Auth failure spike |
| Push body | 20+ failed logins in 5 minutes |
Create a second rule with the same trigger but a Webhook action pointing to your #security Slack channel:
| Field | Value |
|---|---|
| Name | Auth failure spike โ Slack |
| Channel | security |
| Event name | Auth failure |
| Threshold | 20 |
| Window | 5 minutes |
| Cooldown | 15 minutes |
| Action | Webhook |
| URL | Slack incoming webhook URL |
When the alert fires:
ip tagsip in tags (not just metadata) so you can group by IP in the LogIt dashboard without parsing JSON.event: "Password reset requested", threshold 10 in 10 min.Try LogIt free
7-day trial. No credit card required.