From 350c3be0a9af1023eee20643026966fa55e130fa Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Sun, 19 Apr 2026 16:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAlertmanager=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=90=AF=E5=8A=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Prometheus/install_Alertmanager.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Prometheus/install_Alertmanager.sh b/Prometheus/install_Alertmanager.sh index 219a91e..be4f237 100644 --- a/Prometheus/install_Alertmanager.sh +++ b/Prometheus/install_Alertmanager.sh @@ -61,6 +61,12 @@ echo "--------------------------------------------------------" read -p "Do you want to enable Email Notifications? [y/N]: " ENABLE_EMAIL if [[ "$ENABLE_EMAIL" =~ ^[Yy]$ ]]; then read -p "Enter SMTP Host (e.g. smtp.qq.com:465): " SMTP_HOST + # Ensure port is included + if [[ ! "$SMTP_HOST" == *":"* ]]; then + echo "Warning: Port is missing. Using default port :465" + SMTP_HOST="${SMTP_HOST}:465" + fi + read -p "Enter SMTP Auth Username (Email): " SMTP_USER read -s -p "Enter SMTP Auth Password: " SMTP_PASS echo ""