Ntfy headers

This commit is contained in:
2025-06-08 19:42:37 -04:00
parent 7dd33aca8c
commit 7e59d19b46
4 changed files with 51 additions and 26 deletions

View File

@ -3,20 +3,23 @@ import argparse
import cpu
def Interface():
parser = argparse.ArgumentParser(description="Proxmox monitoring tool for phone notifications using ntfy.sh")
parser.add_argument("server_address", help="The ntfy server address.")
parser = argparse.ArgumentParser(
prog="Proxmox monitoring",
description="Proxmox monitoring tool for phone notifications using ntfy.sh")
parser.add_argument("server_address_no_topic", help="The ntfy server address.")
parser.add_argument("--topic", default="proxmox", help="The ntfy topic name that notifications will be sent to. Default = proxmox")
parser.add_argument("-t", "--topic", default="proxmox", help="The ntfy topic name that notifications will be sent to. Default = proxmox")
parser.add_argument("--update-rate", type=int, default=1, help="How often updates happen in seconds. default = 1")
parser.add_argument("--disable-uptime-notifys", action="store_true", help="Disable uptime notifications.")
parser.add_argument("--disable-startup-ping", action="store_true", help="Disable the start up ping.")
parser.add_argument("--disable-startup-notify", action="store_true", help="Disable the start up notify.")
parser.add_argument("--disable-cpu-temp", action="store_true", help="Disable notifications for CPU tempature.")
parser.add_argument("--disable-ntfy-logs", action="store_true", help="Disable logging ntfy activity to the output.")
parser.add_argument("--cpu-temp-warning", type=int, default=70, help="CPU tempature for the warning alert. default = 70")
parser.add_argument("--cpu-temp-warning-message", default=cpu.Tempature.cpu_temp_warning_message, help="The notification message if the CPU is at a high tempature. (message) [TEMP] C")
parser.add_argument("--cpu-temp-warning-timeout", type=int, default=cpu.Tempature.timeout_check, help=f"Timeout in seconds until another CPU tempature related notification can be pushed. default = {cpu.Tempature.timeout_check}")
parser.add_argument("--cpu-temp-warning-message", default=cpu.Tempature.warning_message, help="The notification message if the CPU is at a high tempature. (message) [TEMP] C")
parser.add_argument("--update-rate", type=int, default=1, help="How often updates happen in seconds. default = 1")
parser.add_argument("--startup-ping-message", default="🖥️ Ntfy proxmox monitoring started.", help="The notification message when the program is started.")
parser.add_argument("--startup-notify-message", default="🖥️ Ntfy proxmox monitoring started.", help="The notification message when the program is started.")
return parser.parse_args()