From 96516684577b9c215b95ebeff82c41aeea2c3844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Wirnata?= Date: Mon, 11 Aug 2025 18:44:51 +0200 Subject: [PATCH] zed: prettify slack notification message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This converts the body of a ZED slack notification from plain text to code block style to help with readability. Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: René Wirnata Closes #17610 --- cmd/zed/zed.d/zed-functions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/zed/zed.d/zed-functions.sh b/cmd/zed/zed.d/zed-functions.sh index 6e00f153b..78d8f658d 100644 --- a/cmd/zed/zed.d/zed-functions.sh +++ b/cmd/zed/zed.d/zed-functions.sh @@ -441,8 +441,9 @@ zed_notify_slack_webhook() "${pathname}")" # Construct the JSON message for posting. + # shellcheck disable=SC2016 # - msg_json="$(printf '{"text": "*%s*\\n%s"}' "${subject}" "${msg_body}" )" + msg_json="$(printf '{"text": "*%s*\\n```%s```"}' "${subject}" "${msg_body}" )" # Send the POST request and check for errors. #