naprawa loga w /backup-all

This commit is contained in:
Mateusz Gruszczyński 2025-03-08 15:42:56 +01:00
parent 55f9cbfb9a
commit 2904209332

5
app.py
View File

@ -949,7 +949,10 @@ def backup_all():
raise Exception(f"Daemon GET error: {resp.status_code} - {resp.text}")
data = resp.json()
content = data.get("hosts", "")
description = f'Backup (daemon) from {host.hostname}'
# Wyodrębnienie adresu IP demona
daemon_str = host.daemon_url.split("://")[-1]
daemon_ip = daemon_str.split(":")[0]
description = f'Backup (daemon) from {host.hostname} (Daemon IP: {daemon_ip})'
elif host.type == 'mikrotik':
ssh = open_ssh_connection(host)
stdin, stdout, stderr = ssh.exec_command("/ip dns static export")