summaryrefslogtreecommitdiffstats
path: root/health/notifications
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-11-22 21:47:55 +0000
committerGitHub <noreply@github.com>2023-11-22 23:47:55 +0200
commit5230b15f59fdd47efae668e5ac0c4ca042186e26 (patch)
treefc528fd576f6a20a0ec1d91d7ba45767ddcd477b /health/notifications
parentae733dd494a1f497f5d6bdd0dd1e237f71e91cd9 (diff)
fixes for logging (#16459)
* fixes for logging * added log environment variables to cgroup-network * fix wrong condition * rename variable * fix leftovers * fix log2journal docs and logs
Diffstat (limited to 'health/notifications')
-rwxr-xr-xhealth/notifications/alarm-notify.sh.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in
index 2a62fe2e2a..9d95c21dc3 100755
--- a/health/notifications/alarm-notify.sh.in
+++ b/health/notifications/alarm-notify.sh.in
@@ -98,7 +98,7 @@ NDLP_DEBUG=7 # debug-level messages
LOG_LEVEL=$NDLP_INFO
set_log_min_priority() {
- case "${NETDATA_LOG_PRIORITY_LEVEL,,}" in
+ case "${NETDATA_LOG_LEVEL,,}" in
"emerg" | "emergency")
LOG_LEVEL=$NDLP_EMERG
;;
@@ -141,11 +141,11 @@ log() {
[[ -n "$level" && -n "$LOG_LEVEL" && "$level" -gt "$LOG_LEVEL" ]] && return
- systemd-cat-native --log-as-netdata --newline="{NEWLINE}" <<EOFLOG
+ systemd-cat-native --log-as-netdata --newline="--NEWLINE--" <<EOFLOG
INVOCATION_ID=${NETDATA_INVOCATION_ID}
SYSLOG_IDENTIFIER=${PROGRAM_NAME}
PRIORITY=${level}
-THREAD_TAG="alarm-notify"
+THREAD_TAG=alarm-notify
ND_LOG_SOURCE=health
ND_NIDL_NODE=${host}
ND_NIDL_INSTANCE=${chart}
@@ -169,7 +169,7 @@ ND_ALERT_INFO=${info}
ND_ALERT_DURATION=${duration}
ND_REQUEST=${cmd_line}
MESSAGE_ID=6db0018e83e34320ae2a659d78019fb7
-MESSAGE=[ALERT NOTIFICATION]: ${*//[$'\r\n']/{NEWLINE}}
+MESSAGE=[ALERT NOTIFICATION]: ${*//\\n/--NEWLINE--}
EOFLOG
# AN EMPTY LINE IS NEEDED ABOVE