From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B0467F17E for ; Thu, 20 Jul 2023 16:34:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 33D4B14963 for ; Thu, 20 Jul 2023 16:33:14 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 20 Jul 2023 16:33:11 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id EF65041FBA for ; Thu, 20 Jul 2023 16:33:10 +0200 (CEST) From: Lukas Wagner To: pve-devel@lists.proxmox.com Date: Thu, 20 Jul 2023 16:32:04 +0200 Message-Id: <20230720143236.652292-38-l.wagner@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230720143236.652292-1-l.wagner@proxmox.com> References: <20230720143236.652292-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.085 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH v4 pve-cluster 37/69] datacenter: add APT/fencing/replication notification configuration X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2023 14:34:02 -0000 These options allow setting the notification target for package update notifications, node fencing notifications and replication notifications. Also, fencing and replication has now new options that allow disabling notifications altogether. Signed-off-by: Lukas Wagner --- src/PVE/DataCenterConfig.pm | 63 +++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm index 3d24e78..09be6eb 100644 --- a/src/PVE/DataCenterConfig.pm +++ b/src/PVE/DataCenterConfig.pm @@ -49,13 +49,72 @@ my $notification_format = { 'package-updates' => { type => 'string', enum => ['auto', 'always', 'never'], - description => "Control when the daily update job should send out notification mails.", - verbose_description => "Control how often the daily update job should send out notification mails:\n" + description => "Control when the daily update job should send out notifications.", + verbose_description => "Control how often the daily update job should send out notifications:\n" ."* 'auto' daily for systems with a valid subscription, as those are assumed to be " ." production-ready and thus should know about pending updates.\n" ."* 'always' every update, if there are new pending updates.\n" ."* 'never' never send a notification for new pending updates.\n", default => 'auto', + optional => 1, + }, + 'target-package-updates' => { + type => 'string', + format_description => 'TARGET', + description => "Control where notifications about available updates should be sent to.", + verbose_description => "Control where notifications about available" + . " updates should be sent to." + . " Has to be the name of a notification target (endpoint or notification group)." + . " If the 'target-package-updates' parameter is not set, the system will send mails" + . " to root via a 'sendmail' notification endpoint.", + optional => 1, + }, + 'fencing' => { + type => 'string', + enum => ['always', 'never'], + description => "Control if notifications about node fencing should be sent.", + verbose_description => "Control if notifications about node fencing should be sent.\n" + . "* 'always' always send out notifications\n" + . "* 'never' never send out notifications.\n" + . "For production systems, turning off node fencing notifications is not" + . "recommended!\n", + default => 'always', + optional => 1, + }, + 'target-fencing' => { + type => 'string', + format_description => 'TARGET', + description => "Control where notifications about fenced cluster nodes should be sent to.", + verbose_description => "Control where notifications about fenced cluster nodes" + . " should be sent to." + . " Has to be the name of a notification target (endpoint or notification group)." + . " If the 'target-fencing' parameter is not set, the system will send mails" + . " to root via a 'sendmail' notification endpoint.", + optional => 1, + }, + 'replication' => { + type => 'string', + enum => ['always', 'never'], + description => "Control if notifications for replication failures should be sent.", + verbose_description => "Control if notifications for replication failures should be sent.\n" + . "* 'always' always send out notifications\n" + . "* 'never' never send out notifications.\n" + . "For production systems, turning off replication notifications is not" + . "recommended!\n", + default => 'always', + optional => 1, + }, + 'target-replication' => { + type => 'string', + format_description => 'TARGET', + description => "Control where notifications for failed storage replication jobs should" + . " be sent to.", + verbose_description => "Control where notifications for failed storage replication jobs" + . " should be sent to." + . " Has to be the name of a notification target (endpoint or notification group)." + . " If the 'target-replication' parameter is not set, the system will send mails" + . " to root via a 'sendmail' notification endpoint.", + optional => 1, }, }; -- 2.39.2