fix: Update notifications to make it clearer
All checks were successful
Build Docker / BuildImage (push) Successful in 49s
All checks were successful
Build Docker / BuildImage (push) Successful in 49s
This commit is contained in:
parent
d0d3de0a1e
commit
e8d2a6875d
12
server.py
12
server.py
@ -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"])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user