mirror of
https://github.com/andrey271192/vps_monitoring.git
synced 2026-09-20 11:55:34 +00:00
feat: keenetic integration, VPN alerts, docs
Wire keenetic monitor loop and router into main app. Add deduplicated Telegram alerts for router offline, internet, CPU/RAM, and VPN down. Update README with KeenDNS edit, import format, troubleshooting. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,7 +30,13 @@ async def send_telegram(message: str, parse_mode: str = "Markdown"):
|
||||
"text": message,
|
||||
"parse_mode": parse_mode,
|
||||
}) as resp:
|
||||
return resp.status == 200
|
||||
ok = resp.status == 200
|
||||
if ok:
|
||||
logger.info(f"Telegram sent: {message[:80]}")
|
||||
else:
|
||||
body = await resp.text()
|
||||
logger.error(f"Telegram send HTTP {resp.status}: {body[:200]}")
|
||||
return ok
|
||||
except Exception as e:
|
||||
logger.error(f"Telegram send error: {e}")
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user