From 7b389d0ad3289969cbf619ee185d35cbcd5672a6 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 10 Jan 2024 15:55:53 -0500 Subject: [PATCH 1/4] fix(tools): make username, password optional in manage alerts for mail servers --- tools/anvil-manage-alerts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/anvil-manage-alerts b/tools/anvil-manage-alerts index acc6fc70..91e2bd03 100755 --- a/tools/anvil-manage-alerts +++ b/tools/anvil-manage-alerts @@ -670,7 +670,7 @@ sub handle_mail_servers { # Do we have what we need? my $problem = 0; - foreach my $switch ("mail-server-address", "mail-server-port", "mail-server-username", "mail-server-password", "mail-server-security", "mail-server-authentication", "mail-server-helo-domain") + foreach my $switch ("mail-server-address", "mail-server-port", "mail-server-security", "mail-server-authentication", "mail-server-helo-domain") { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { switch => $switch, From 17bd67d0c4d0d3e2338c623151b6e8eec5453adb Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Mon, 15 Jan 2024 14:53:04 -0500 Subject: [PATCH 2/4] fix(tools): disable mail server auth translation in manage alerts --- tools/anvil-manage-alerts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/anvil-manage-alerts b/tools/anvil-manage-alerts index 91e2bd03..74dae9a6 100755 --- a/tools/anvil-manage-alerts +++ b/tools/anvil-manage-alerts @@ -1817,7 +1817,8 @@ sub check_switches { # normal_password $anvil->data->{sys}{say_new_auth} = "name_0001"; - $anvil->data->{switches}{"mail-server-authentication"} = "normal_password"; + # TODO: revisit translation(s) after verifying against config syntax + # $anvil->data->{switches}{"mail-server-authentication"} = "normal_password"; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "sys::say_new_auth" => $anvil->data->{sys}{say_new_auth}, "switches::mail-server-authentication" => $anvil->data->{switches}{"mail-server-authentication"}, From a5a41c42ad6c65df955de9500903e21e7fe3d565 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 26 Jan 2024 17:03:29 -0500 Subject: [PATCH 3/4] docs(tools): add ignore option to alert override level --- man/anvil-manage-alerts.8 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/anvil-manage-alerts.8 b/man/anvil-manage-alerts.8 index cb25d87c..b0b47de1 100644 --- a/man/anvil-manage-alerts.8 +++ b/man/anvil-manage-alerts.8 @@ -52,6 +52,8 @@ This is the desired override alert level. Valid values are: +0 = "ignore" all alerts + 1 = "critical" alerts only 2 = "warning" and critical alerts From b11606091e2448c09f58e7bfb83bf9346c875cf3 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 26 Jan 2024 17:45:19 -0500 Subject: [PATCH 4/4] docs(tools): add descriptions to alert levels in manager alerts --- man/anvil-manage-alerts.8 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/man/anvil-manage-alerts.8 b/man/anvil-manage-alerts.8 index b0b47de1..502b328e 100644 --- a/man/anvil-manage-alerts.8 +++ b/man/anvil-manage-alerts.8 @@ -142,11 +142,28 @@ Valid values are: 1 = "critical" alerts only +Critical alerts are events that could lead to imminent service interruption or unexpected loss of redundancy. + +These alerts will go to all recipients except for those ignoring the source system entirely. + +Alerts at this level should trigger alarm systems for all administrators as well as management who may be impacted by service interruptions. + 2 = "warning" and critical alerts +Warning alerts may require attention, such as intentional loss of redundancy caused by load shedding, hardware in pre-failure, loss of input power, temperature anomalies, etc. + +Alerts at this level should trigger alarm systems for administrative staff. + 3 = "notice", warning and critical alerts -4 = "info"; All alerts. This generates almost constant alerts! +Notice alerts are generally safe to ignore, but might provide early warnings of developing issues or insight into system behaviour. + +Alerts at this level should not trigger alarm systems. Periodic review is sufficient. + +4 = "info"; All alerts. This generates almost constant alerts! + +Info alerts are almost always safe to ignore, but may be useful in testing and debugging. + .TP \fB\-\-test\fR Tells the program to send a test alert at the desired \fB\-\-level\fR. The requested level is required.