fix: heartbeat only to SAC, never Telegram/email
agent.heartbeat bypasses NOTIFY_CHAIN in all UseSAC modes; SAC ingest only. Bump to 1.2.3-SAC.
This commit is contained in:
@@ -292,6 +292,10 @@ print(json.dumps(out) if out else "")
|
||||
PY
|
||||
}
|
||||
|
||||
sac_is_heartbeat_only_event() {
|
||||
[ "${1:-}" = "agent.heartbeat" ]
|
||||
}
|
||||
|
||||
# notify_or_sac type severity title summary telegram_message [details_json]
|
||||
notify_or_sac() {
|
||||
local event_type="$1"
|
||||
@@ -307,6 +311,22 @@ notify_or_sac() {
|
||||
local mode
|
||||
mode="$(sac_normalize_mode "${UseSAC:-off}")"
|
||||
|
||||
# Периодический heartbeat — только SAC (браузер), без Telegram/email в любом режиме.
|
||||
if sac_is_heartbeat_only_event "$event_type"; then
|
||||
case "$mode" in
|
||||
off)
|
||||
return 0
|
||||
;;
|
||||
exclusive|dual|fallback)
|
||||
sac_send_event "$event_type" "$severity" "$title" "$summary" "$details_json"
|
||||
return $?
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$mode" in
|
||||
off)
|
||||
notify_send "$telegram_message"
|
||||
|
||||
Reference in New Issue
Block a user