mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-12 05:35:19 +00:00
ram and cpu monitoring
This commit is contained in:
parent
5bbcf95015
commit
4fd3391c70
5 changed files with 93 additions and 8 deletions
|
|
@ -39,7 +39,11 @@ async def checker(check: Callable | Coroutine, interval_secs: int, client: nio.A
|
|||
async def main():
|
||||
signal.signal(signal.SIGTERM, stop_gracefully)
|
||||
client = await alerts.get_client()
|
||||
checkers = (checker(checks.temp_check, 5 * 60, client),)
|
||||
checkers = (
|
||||
checker(checks.temp_check, 5 * 60, client),
|
||||
checker(checks.cpu_check, 5 * 60, client),
|
||||
checker(checks.ram_check, 1 * 60, client),
|
||||
)
|
||||
async with asyncio.TaskGroup() as tg:
|
||||
checker_tasks: set[asyncio.Task] = set()
|
||||
for c in checkers:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue