Add system metrics snapshot
This commit is contained in:
3
main.py
3
main.py
@@ -5,6 +5,7 @@ from app import bot, dp, cfg, ADMIN_ID
|
||||
from keyboards import menu_kb
|
||||
from services.docker import discover_containers, docker_watchdog
|
||||
from services.alerts import monitor_resources, monitor_smart
|
||||
from services.metrics import MetricsStore, start_sampler
|
||||
from services.queue import worker as queue_worker
|
||||
from services.notify import notify
|
||||
import state
|
||||
@@ -36,6 +37,8 @@ async def main():
|
||||
asyncio.create_task(monitor_resources(cfg, notify, bot, ADMIN_ID))
|
||||
if cfg.get("alerts", {}).get("smart_enabled", True):
|
||||
asyncio.create_task(monitor_smart(cfg, notify, bot, ADMIN_ID))
|
||||
state.METRICS_STORE = MetricsStore()
|
||||
asyncio.create_task(start_sampler(state.METRICS_STORE, interval=5))
|
||||
asyncio.create_task(queue_worker())
|
||||
await notify_start()
|
||||
await dp.start_polling(bot)
|
||||
|
||||
Reference in New Issue
Block a user