]> git.proxmox.com Git - pve-cluster.git/commitdiff
datacenter: add APT/fencing/replication notification configuration
authorLukas Wagner <l.wagner@proxmox.com>
Thu, 20 Jul 2023 14:32:04 +0000 (16:32 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 24 Jul 2023 10:02:24 +0000 (12:02 +0200)
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 <l.wagner@proxmox.com>
src/PVE/DataCenterConfig.pm

index 3d24e7886686cda44aa5b6d87d0abcd92b835326..09be6ebc91bd3c4a7b8d99d2c48eff5250625705 100644 (file)
@@ -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,
     },
 };