fix: Update notifications to make it clearer
All checks were successful
Build Docker / BuildImage (push) Successful in 49s

This commit is contained in:
Nathan Woodburn 2024-09-12 20:20:07 +10:00
parent d0d3de0a1e
commit e8d2a6875d
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -460,10 +460,14 @@ def send_down_notification(node):
if not node["cert_853"]["valid"]: if not node["cert_853"]["valid"]:
description += "- Certificate on port 853 is invalid\n" description += "- Certificate on port 853 is invalid\n"
# Also add the expiry date of the certificates if node["plain_dns"] and node["doh"] and node["dot"]:
description += "\nCertificate expiry dates:\n" if node["cert"]["valid"] and node["cert_853"]["valid"]:
description += f"- Certificate on port 443 expires {node['cert']['expires']}\n" description = f"The certificate on {node['name']} ({node['ip']}) is expiring soon\n"
description += f"- Certificate on port 853 expires {node['cert_853']['expires']}\n" title = f"{node['name']} certificate is expiring soon"
# Also add the expiry date of the certificates
description += "\nCertificate expiry dates:\n"
description += f"- Certificate on port 443 expires {node['cert']['expires']}\n"
description += f"- Certificate on port 853 expires {node['cert_853']['expires']}\n"
send_notification(title, description, node["name"]) send_notification(title, description, node["name"])