From 6a4db2d7ad0c77e4ca5be1ebac6fd74edcc73d9e Mon Sep 17 00:00:00 2001 From: ssh-monitor Date: Tue, 14 Apr 2026 11:15:19 +1000 Subject: [PATCH] =?UTF-8?q?Zabbix=20alert:=20=D1=83=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20NUL=20=D0=B8=D0=B7=20=D1=82=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=D1=82=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=20trapper=20(-i)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- ssh-monitor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssh-monitor b/ssh-monitor index b1031a9..450db9d 100644 --- a/ssh-monitor +++ b/ssh-monitor @@ -7,7 +7,7 @@ IFS=$'\n\t' # ============================================ CONFIG_FILE="/etc/ssh-monitor.conf" -SSH_MONITOR_VERSION="0.9.5.6" +SSH_MONITOR_VERSION="0.9.5.7" TELEGRAM_BOT_TOKEN="" TELEGRAM_CHAT_ID="" @@ -636,7 +636,8 @@ send_zabbix_trapper() { key_sq="$(printf '%s' "$key_sq" | tr -d '\r')" local one_line - one_line="$(printf '%s' "$message" | tr '\n\r\t' ' ')" + # NUL в значении обрезает файл у первого \0 — Zabbix часто отвечает failed: 1 + one_line="$(printf '%s' "$message" | tr -d '\000' | tr '\n\r\t' ' ')" local max_len=60000 if [ "${#one_line}" -gt "$max_len" ]; then one_line="${one_line:0:$max_len}..."