henrygd / beszel

A lightweight server monitoring hub with historical data, docker stats, and alerts.
MIT License
1.11k stars 45 forks source link

[Feature Request] Configurable time window before triggering an alert #115

Closed cid214 closed 1 month ago

cid214 commented 1 month ago

It'd be nice to be able to say 'trigger if cpu usage exceeds x% for y seconds' rather than it be an immediate trigger.

Locally this is causing a LOT of flapping notifications because I do backups compressed with xz, and use all the cpu cores which results in 100% usage but only for ~30 seconds to a minute, but that's still enough to trigger the notifications.

It'd be nice to be able to tweak the sensitivity of the notifications to not immediately trigger because CPU spikes are an expected part of a lot of workloads.

henrygd commented 1 month ago

See #93

Rather than 'x above y for z seconds,' it will need to be based on average utilization.

Right now it's calculated by one minute average. I should be able to add 10m, 20m, and 2h options. Or possibly just any round value between 1m and 60m.

This is behind some other things currently so I probably won't get to it until next month at the earliest.